summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-04-18 15:44:31 +0200
committerLars Wendler <polynomial-c@gentoo.org>2016-04-18 15:56:23 +0200
commit13b11d0a5c7a197c66ef8cd986d475c2b215cc64 (patch)
treeeeb02fba29025e9493a749234d98d6645e86f49a /sys-apps/smartmontools/smartmontools-9999.ebuild
parentx11-terms/terminology: update live ebuild (diff)
downloadgentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.tar.gz
gentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.tar.bz2
gentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.zip
sys-apps/smartmontools: Revbump to fix bugs #575292 and #580424
Don't install drivedb.h into /usr and don't add it to the PM's file database (#575292). Fix download location of latest drivedb.h file (#580424). Package-Manager: portage-2.2.28 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps/smartmontools/smartmontools-9999.ebuild')
-rw-r--r--sys-apps/smartmontools/smartmontools-9999.ebuild53
1 files changed, 42 insertions, 11 deletions
diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild b/sys-apps/smartmontools/smartmontools-9999.ebuild
index 241fec4f456a..9b4bce3b1fa3 100644
--- a/sys-apps/smartmontools/smartmontools-9999.ebuild
+++ b/sys-apps/smartmontools/smartmontools-9999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="4"
+EAPI=5
inherit flag-o-matic systemd
if [[ ${PV} == "9999" ]] ; then
@@ -11,17 +11,21 @@ if [[ ${PV} == "9999" ]] ; then
inherit subversion autotools
else
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-freebsd ~x86-linux ~x64-macos"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~x64-macos"
fi
DESCRIPTION="Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) monitoring tools"
-HOMEPAGE="http://smartmontools.sourceforge.net/"
+HOMEPAGE="https://www.smartmontools.org"
LICENSE="GPL-2"
SLOT="0"
IUSE="caps minimal selinux static"
-DEPEND="caps? ( sys-libs/libcap-ng )
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
selinux? (
sys-libs/libselinux
)"
@@ -31,8 +35,11 @@ RDEPEND="${DEPEND}
"
src_prepare() {
+ # 580424
+ sed '/^SRCEXPR/s@http:@https:@' \
+ -i update-smart-drivedb.in \
+ || die
if [[ ${PV} == "9999" ]] ; then
- #./autogen.sh
eautoreconf
fi
}
@@ -42,12 +49,15 @@ src_configure() {
use static && append-ldflags -static
# The build installs /etc/init.d/smartd, but we clobber it
# in our src_install, so no need to manually delete it.
- econf \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
- --with-initscriptdir="${EPREFIX}/etc/init.d" \
- $(use_with caps libcap-ng) \
- $(use_with selinux) \
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir=/var/db/${PN} #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
$(systemd_with_unitdir)
+ )
+ econf "${myeconfargs[@]}"
}
src_install() {
@@ -59,4 +69,25 @@ src_install() {
newinitd "${FILESDIR}"/smartd-r1.rc smartd
newconfd "${FILESDIR}"/smartd.confd smartd
fi
+
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}"/var/db/${PN}/drivedb.h "${T}" || die
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${PN}-update-drivedb
+}
+
+pkg_postinst() {
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The drive database file has been replaced with the version that"
+ ewarn "got shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h ${db_path} || die
}