summaryrefslogtreecommitdiff
blob: 45e756343123f5b316901ced29dd570eb36efdf5 (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
52
53
54
55
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/pkgcore-checks/pkgcore-checks-9999.ebuild,v 1.3 2014/04/25 04:51:21 radhermit Exp $

EAPI=4
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
inherit distutils-r1

if [[ ${PV} == *9999 ]] ; then
	EGIT_REPO_URI="git://github.com/pkgcore/pkgcore-checks.git"
	inherit git-r3
else
	KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
	SRC_URI="http://pkgcore-checks.googlecode.com/files/${P}.tar.bz2"
fi

DESCRIPTION="pkgcore developmental repoman replacement"
HOMEPAGE="http://www.pkgcore.org/"

LICENSE="GPL-2"
SLOT="0"

RDEPEND="=sys-apps/pkgcore-9999
	=dev-python/snakeoil-9999"
DEPEND="${RDEPEND}"

pkg_setup() {
	# disable snakeoil 2to3 caching...
	unset PY2TO3_CACHEDIR
}

python_test() {
	esetup.py test
}

python_install_all() {
	local DOCS=( AUTHORS NEWS )
	distutils-r1_python_install_all
}

pkg_postinst() {
	einfo "updating pkgcore plugin cache"
	python_foreach_impl pplugincache pkgcore_checks.plugins pkgcore.plugins
}

pkg_postrm() {
	# Careful not to remove this on up/downgrades.
	plugincache_update() {
		local sitep="${ROOT}$(python_get_sitedir)"
		if [[ -e "${sitep}/pkgcore_checks/plugins/plugincache2" && ! -e "${sitep}/pkgcore_checks/base.py" ]]; then
			rm "${sitep}/pkgcore_checks/plugins/plugincache2"
		fi
	}
	python_foreach_impl plugincache_update
}