summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-05-07 21:02:20 +0200
committerLars Wendler <polynomial-c@gentoo.org>2016-05-07 21:02:20 +0200
commit214e57f5eb11f3f00dd62246cb7b3085e0b958d0 (patch)
treeb9421b354d0b249c269c6cec693d3c4592a68563 /sys-apps/smartmontools/smartmontools-9999.ebuild
parentEAPI=6 support; removed support befor media-video/vdr-2 (diff)
downloadgentoo-214e57f5eb11f3f00dd62246cb7b3085e0b958d0.tar.gz
gentoo-214e57f5eb11f3f00dd62246cb7b3085e0b958d0.tar.bz2
gentoo-214e57f5eb11f3f00dd62246cb7b3085e0b958d0.zip
sys-apps/smartmontools: Bump to version 6.5
Synced live ebuild. 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.ebuild46
1 files changed, 26 insertions, 20 deletions
diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild b/sys-apps/smartmontools/smartmontools-9999.ebuild
index 9b4bce3b1fa3..ff70dcf2c079 100644
--- a/sys-apps/smartmontools/smartmontools-9999.ebuild
+++ b/sys-apps/smartmontools/smartmontools-9999.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="https://www.smartmontools.org"
LICENSE="GPL-2"
SLOT="0"
-IUSE="caps minimal selinux static"
+IUSE="caps minimal selinux static update_drivedb"
DEPEND="
caps? (
@@ -35,10 +35,6 @@ RDEPEND="${DEPEND}
"
src_prepare() {
- # 580424
- sed '/^SRCEXPR/s@http:@https:@' \
- -i update-smart-drivedb.in \
- || die
if [[ ${PV} == "9999" ]] ; then
eautoreconf
fi
@@ -56,11 +52,14 @@ src_configure() {
$(use_with caps libcap-ng)
$(use_with selinux)
$(systemd_with_unitdir)
+ $(use_with update_drivedb update-smart-drivedb)
)
econf "${myeconfargs[@]}"
}
src_install() {
+ local db_path="/var/db/${PN}"
+
if use minimal ; then
dosbin smartctl
doman smartctl.8
@@ -68,26 +67,33 @@ src_install() {
default
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
+ keepdir ${db_path}
+ if use update_drivedb ; then
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}"${db_path}/drivedb.h "${T}" || die
- exeinto /etc/cron.monthly
- doexe "${FILESDIR}"/${PN}-update-drivedb
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${PN}-update-drivedb
+ fi
+ fi
}
pkg_postinst() {
- local db_path="/var/db/${PN}"
+ if ! use minimal ; then
+ 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
+ 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
+ if use update_drivedb ; then
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h ${db_path} || die
+ fi
+ fi
}