summaryrefslogtreecommitdiff
blob: 186af044cf41deffbe85f2fe6215a8cca12cc7bb (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
56
57
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="3"
PYTHON_DEPEND="2"
PYTHON_USE_WITH="xml"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"

inherit git-2 python

DESCRIPTION="Tools to work with layman-global.txt/repositories.xml like files"
HOMEPAGE="http://cgit.gentoo.org/proj/repositories-xml-format.git"
SRC_URI=""
EGIT_REPO_URI="git://anongit.gentoo.org/proj/repositories-xml-format.git
	http://anongit.gentoo.org/git/proj/repositories-xml-format.git"
EGIT_COMMIT="8c4d7440c6d47f7ed690edafb7c0af53742f3297"

if [[ ${PV} != 0_p20100322 ]]; then
	die 'Broken bump detected: same \${EGIT_COMMIT} again'
fi

LICENSE="|| ( GPL-2 GPL-3 )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="app-portage/layman"

src_install() {
	abi_specific_install() {
		local code_dir="$(python_get_sitedir)"/layman/dbtools

		exeinto "${code_dir}"
		doexe write-repositories-xml.py || die "doexe failed"

		insinto "${code_dir}"
		doins layman/dbtools/*.py || die "doins failed"

		dodir /usr/bin
		dosym "${code_dir}"/write-repositories-xml.py /usr/bin/write-repositories-xml-${PYTHON_ABI} \
			|| die "dosym failed"
	}
	python_execute_function abi_specific_install

	python_generate_wrapper_scripts "${ED}usr/bin/write-repositories-xml"
}

pkg_postinst() {
	python_mod_optimize layman/dbtools
}

pkg_postrm() {
	python_mod_cleanup layman/dbtools
}