summaryrefslogtreecommitdiff
blob: 787631ebb28fca5ce98d2fecaa8e44a7d0a4f24c (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
# 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

	insinto /usr/lib/postsync.d
	doins postsync.d/*

	dodoc README ChangeLog doc/*
}

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
}