diff options
Diffstat (limited to 'sys-apps/smartmontools/smartmontools-9999.ebuild')
-rw-r--r-- | sys-apps/smartmontools/smartmontools-9999.ebuild | 46 |
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 } |