]> Pileus Git - ~andy/sunrise/blob - app-portage/postsync/postsync-0.2_alpha.ebuild
Correction to HOMPAGE address
[~andy/sunrise] / app-portage / postsync / postsync-0.2_alpha.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 DESCRIPTION="Package for controlling post emerge --sync operations"
6 HOMEPAGE="http://www.electron.me.uk/postsync.html"
7 SRC_URI="http://www.electron.me.uk/files/${P}.tar.bz2"
8 LICENSE="GPL-2"
9 SLOT="0"
10 KEYWORDS="~x86"
11 IUSE=""
12 S=${WORKDIR}/${PN}
13
14 DEPEND=">=virtual/python-2.3"
15
16 RDEPEND="${DEPEND}"
17
18 src_install() {
19         PORTCFG=$(python -c 'import portage; print portage.USER_CONFIG_PATH,') \
20                 || die "Cannot get config path"
21         PSDIR="/usr/lib/postsync.d"
22         PSBIN="${PSDIR}/bin"
23         PSETC="${PSDIR}/etc"
24         
25         exeinto /usr/sbin
26         doexe postsync
27
28         exeinto ${PORTCFG}/bin
29         doexe post_sync
30
31         exeinto ${PSBIN}
32         doexe bin/*
33
34         dodir ${PSETC}
35
36         dodoc README ChangeLog doc/*
37 }
38
39 pkg_postinst() {
40         ebegin "Moving any existing config files ..."
41         PORTCFG=$(python -c 'import portage; print portage.USER_CONFIG_PATH,')
42         if [ -f ${PORTCFG}/package.warnme ]
43         then
44                 mv ${PORTCFG}/package.warnme /usr/lib/postsync.d/etc
45         fi
46         eend
47
48         einfo
49         einfo "Use postsync -l to see what programs are available then"
50         einfo "postsync -e -a <prog> [prog ...] to activate the ones you want."
51         einfo
52 }
53
54 pkg_prerm() {
55         /usr/sbin/postsync -d
56 }