commit:     960be4798ed78136a30e38f0087c4cefdc22801c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  2 20:21:25 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Jan  2 20:24:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=960be479

sys-apps/smartmontools: Synced live ebuild

Bug: https://bugs.gentoo.org/695108
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/smartmontools/smartmontools-9999.ebuild | 26 ++++++++++++++----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild 
b/sys-apps/smartmontools/smartmontools-9999.ebuild
index 9c4544209c1..bcbd184c16d 100644
--- a/sys-apps/smartmontools/smartmontools-9999.ebuild
+++ b/sys-apps/smartmontools/smartmontools-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -18,7 +18,7 @@ HOMEPAGE="https://www.smartmontools.org";
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="caps +daemon selinux static systemd update_drivedb"
+IUSE="caps +daemon selinux static systemd +update-drivedb"
 
 DEPEND="
        caps? (
@@ -32,7 +32,7 @@ RDEPEND="${DEPEND}
        daemon? ( virtual/mailx )
        selinux? ( sec-policy/selinux-smartmon )
        systemd? ( sys-apps/systemd )
-       update_drivedb? (
+       update-drivedb? (
                app-crypt/gnupg
                || (
                        net-misc/curl
@@ -43,7 +43,10 @@ RDEPEND="${DEPEND}
        )
 "
 
-REQUIRED_USE="( caps? ( daemon ) )"
+REQUIRED_USE="(
+       caps? ( daemon )
+       static? ( !systemd )
+)"
 
 src_prepare() {
        default
@@ -61,8 +64,8 @@ src_configure() {
                $(use_with caps libcap-ng)
                $(use_with selinux)
                $(use_with systemd libsystemd)
-               $(use_with update_drivedb gnupg)
-               $(use_with update_drivedb update-smart-drivedb)
+               $(use_with update-drivedb gnupg)
+               $(use_with update-drivedb update-smart-drivedb)
                $(usex systemd 
"--with-systemdsystemunitdir=$(systemd_get_systemunitdir)" '')
        )
        econf "${myeconfargs[@]}"
@@ -70,6 +73,7 @@ src_configure() {
 
 src_install() {
        local db_path="/var/db/${PN}"
+       insopts -m0644 -p # preserve timestamps
 
        if use daemon; then
                default
@@ -84,7 +88,7 @@ src_install() {
                einstalldocs
        fi
 
-       if use update_drivedb ; then
+       if use update-drivedb ; then
                if ! use daemon; then
                        dosbin "${S}"/update-smart-drivedb
                fi
@@ -93,7 +97,7 @@ src_install() {
                doexe "${FILESDIR}/${PN}-update-drivedb"
        fi
 
-       if use daemon || use update_drivedb; then
+       if use daemon || use update-drivedb; then
                keepdir "${db_path}"
 
                # Install a copy of the initial drivedb.h to /usr/share/${PN}
@@ -113,7 +117,7 @@ src_install() {
 }
 
 pkg_postinst() {
-       if use daemon || use update_drivedb; then
+       if use daemon || use update-drivedb; then
                local initial_db_file="${EROOT}/usr/share/${PN}/drivedb.h"
                local db_path="${EROOT}/var/db/${PN}"
 
@@ -137,10 +141,10 @@ pkg_postinst() {
                        ewarn ""
                        ewarn "     /usr/sbin/update-smart-drivedb"
 
-                       if ! use update_drivedb ; then
+                       if ! use update-drivedb ; then
                                ewarn ""
                                ewarn "However, 'update-smart-drivedb' requires 
that you re-emerge ${PN}"
-                               ewarn "with USE='update_drivedb'."
+                               ewarn "with USE='update-drivedb'."
                        fi
                fi
        fi

Reply via email to