forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demerge-0.047-r1.ebuild
44 lines (37 loc) · 1.31 KB
/
demerge-0.047-r1.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
DESCRIPTION="demerge - revert to previous installation states"
HOMEPAGE="http://download.mpsna.de/opensource/demerge/"
SRC_URI="http://download.mpsna.de/opensource/demerge/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm ia64 ppc ~ppc64 sh sparc x86"
IUSE=""
DEPEND="dev-lang/perl
>=dev-perl/PortageXS-0.02.10-r3
virtual/perl-Term-ANSIColor
dev-perl/TermReadKey
dev-perl/Shell-EnvImporter"
RDEPEND="${DEPEND}
sys-apps/portage"
src_unpack() {
unpack ${A}
cd "${S}"
# Fix path for new make.conf location
sed -i -e 's:/etc/make.conf:/etc/portage/make.conf:g' demerge
}
src_install() {
dobin demerge || die
dodoc Changelog
doman demerge.3
}
pkg_postinst() {
if [ ! -e /etc/portage/postsync.d/demerge-record ]; then
mkdir -p /etc/portage/postsync.d/
echo '[ -x /usr/bin/demerge ] && /usr/bin/demerge --postsync' > /etc/portage/postsync.d/demerge-record
elog "/etc/portage/postsync.d/demerge-record has been installed for convenience"
elog "If you wish for it to be automatically run at the end of every --sync simply chmod +x /etc/portage/postsync.d/demerge-record"
elog "If ever you find this to be an inconvenience simply chmod -x /etc/portage/postsync.d/demerge-record"
fi
}