sys-devel/icecream: Use dev-util/shadowman for postinst/prerm
authorMichał Górny <mgorny@gentoo.org>
Thu, 10 Aug 2017 20:13:27 +0000 (22:13 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sat, 26 Aug 2017 13:36:56 +0000 (15:36 +0200)
sys-devel/icecream/icecream-1.0.0-r2.ebuild

index 187928a2290d467300dfc9704bf5a3aa8365331c..ead3cbfcfa515ec4111c62358c439012900ad386 100644 (file)
@@ -13,13 +13,16 @@ SRC_URI="ftp://ftp.suse.com/pub/projects/${PN}/${MY_P}.tar.bz2"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86"
+KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-RDEPEND="
+DEPEND="
        sys-libs/libcap-ng
 "
-DEPEND="${RDEPEND}"
+RDEPEND="
+       ${DEPEND}
+       dev-util/shadowman
+"
 
 S="${WORKDIR}/${MY_P}"
 
@@ -52,3 +55,15 @@ src_install() {
        insinto /usr/share/shadowman/tools
        newins - icecc <<<'/usr/libexec/icecc/bin'
 }
+
+pkg_prerm() {
+       if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+               eselect compiler-shadow remove icecc
+       fi
+}
+
+pkg_postinst() {
+       if [[ ${ROOT} == / ]]; then
+               eselect compiler-shadow update icecc
+       fi
+}