net-misc/asterisk: fix USE=-samples.
authorJaco Kroon <jaco@uls.co.za>
Sun, 19 Apr 2020 19:40:25 +0000 (21:40 +0200)
committerJoonas Niilola <juippis@gentoo.org>
Tue, 21 Apr 2020 08:17:21 +0000 (11:17 +0300)
Note: USE=samples only really install default configs into
/etc/asterisk, as such, IUSE=samples is going away on the next bump, so
default configs will be installed.  Use INSTALL_MASK to prevent this if
you don't want this:

INSTALL_MASK=/etc/asterisk/* in make.conf

Closes: https://bugs.gentoo.org/717450
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/15416
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
net-misc/asterisk/asterisk-13.32.0-r1.ebuild
net-misc/asterisk/asterisk-16.9.0.ebuild

index 63d8d692786845e2bb5cfceed1e743d95047bfd3..49dc718b5c0c759cf8ab0db6de9b1b5288c79c1a 100644 (file)
@@ -247,21 +247,13 @@ src_install() {
        diropts -m 0750 -o root -g asterisk
        keepdir /etc/asterisk
        if use samples; then
-               emake NOISY_BUILD=yes DESTDIR="${ED}" samples
+               emake NOISY_BUILD=yes DESTDIR="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs
                for conffile in "${ED}/etc/asterisk/"*
                do
                        fowners root:root "${conffile#${ED}}"
                        fperms 0644 "${conffile#${ED}}"
                done
-               einfo "Sample files have been installed"
-       else
-               einfo "Skipping installation of sample files..."
-               rm "${ED}"/var/lib/asterisk/mohmp3/* || die
-               rm "${ED}"/var/lib/asterisk/sounds/demo-* || die
-               rm "${ED}"/var/lib/asterisk/agi-bin/* || die
-               rm "${ED}"/etc/asterisk/* || die
        fi
-       rm -r "${ED}"/var/spool/asterisk/voicemail/default || die
 
        # keep directories
        diropts -m 0750 -o asterisk -g root
index 9f32978aaa52cd49d2f6eda0b262f409a40f4e1f..b7d72507ad546641d1839842cfcad9084e528beb 100644 (file)
@@ -248,21 +248,13 @@ src_install() {
        diropts -m 0750 -o root -g asterisk
        keepdir /etc/asterisk
        if use samples; then
-               emake NOISY_BUILD=yes DESTDIR="${ED}" samples
+               emake NOISY_BUILD=yes DESTDIR="${ED}" CONFIG_SRC=configs/samples CONFIG_EXTEN=.sample install-configs
                for conffile in "${ED}/etc/asterisk/"*
                do
                        fowners root:root "${conffile#${ED}}"
                        fperms 0644 "${conffile#${ED}}"
                done
-               einfo "Sample files have been installed"
-       else
-               einfo "Skipping installation of sample files..."
-               rm "${ED}"/var/lib/asterisk/mohmp3/* || die
-               rm "${ED}"/var/lib/asterisk/sounds/demo-* || die
-               rm "${ED}"/var/lib/asterisk/agi-bin/* || die
-               rm "${ED}"/etc/asterisk/* || die
        fi
-       rm -r "${ED}"/var/spool/asterisk/voicemail/default || die
 
        # keep directories
        diropts -m 0750 -o asterisk -g root