blob: 66cc46a4bb0426884b916f7f2a3f7eee1915415c (
plain)
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
45
46
47
48
49
50
51
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="Package for controlling post emerge --sync operations"
HOMEPAGE="http://www.electron.me.uk/postsync"
SRC_URI="http://www.electron.me.uk/files/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
S=${WORKDIR}/${PN}
DEPEND=">=virtual/python-2.3"
RDEPEND="${DEPEND}"
src_install() {
PORTCFG=$(python -c 'import portage; print portage.USER_CONFIG_PATH,') \
|| die "Cannot get config path"
exeinto /usr/sbin
doexe postsync
insinto ${PORTCFG}/bin
doins bin/post_sync
dosed "s:/etc/portage:${PORTCFG}:g" ${PORTCFG}/bin/post_sync
insinto /usr/lib/postsync.d
doins postsync.d/*
dodoc README ChangeLog doc/*
fowners root:portage /usr/sbin/postsync ${PORTCFG}/bin/post_sync
cd postsync.d
for f in *
do
fowners root:portage /usr/lib/${f}
done
}
pkg_postinst() {
einfo
einfo "Postsync programs and the postsync system are disabled by default."
einfo "Use postsync -l to see what programs are available then"
einfo "postsync -e -a <prog> [prog ...] to activate the ones you want."
einfo
}
pkg_prerm() {
/usr/sbin/postsync -d
}
|