forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repoman-9999.ebuild
99 lines (82 loc) · 2.24 KB
/
repoman-9999.ebuild
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=(
pypy
python3_3 python3_4 python3_5
python2_7
)
PYTHON_REQ_USE='bzip2(+)'
inherit distutils-r1 git-r3 multilib
DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
LICENSE="GPL-2"
KEYWORDS=""
SLOT="0"
IUSE=""
DEPEND="
dev-lang/python-exec:2
=sys-apps/portage-9999
"
RDEPEND="
dev-lang/python-exec:2
=sys-apps/portage-9999
>=dev-python/lxml-3.6.0
"
SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/repoman"
EGIT_REPO_URI="git://anongit.gentoo.org/proj/portage.git
https://github.com/gentoo/portage.git"
prefix_src_archives() {
local x y
for x in ${@}; do
for y in ${SRC_ARCHIVES}; do
echo ${y}/${x}
done
done
}
TARBALL_PV=${PV}
SRC_URI=""
S="${WORKDIR}/${P}/repoman"
python_prepare_all() {
distutils-r1_python_prepare_all
if [[ -n ${EPREFIX} ]] ; then
einfo "Prefixing shebangs ..."
while read -r -d $'\0' ; do
local shebang=$(head -n1 "$REPLY")
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \
die "sed failed"
fi
done < <(find . -type f -print0)
fi
}
python_test() {
esetup.py test
}
python_install() {
# Install sbin scripts to bindir for python-exec linking
# they will be relocated in pkg_preinst()
distutils-r1_python_install \
--system-prefix="${EPREFIX}/usr" \
--bindir="$(python_get_scriptdir)" \
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
--htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
--sbindir="$(python_get_scriptdir)" \
--sysconfdir="${EPREFIX}/etc" \
"${@}"
}
python_install_all() {
distutils-r1_python_install_all
}
pkg_postinst() {
einfo ""
einfo "This release of repoman is from the new portage/repoman split"
einfo "release code base."
einfo "This new repoman code base is still being developed. So its API's"
einfo "are not to be considered stable and are subject to change."
einfo "The code released has been tested and considered ready for use."
einfo "This however does not guarantee it to be completely bug free."
einfo "Please report any bugs you may encounter."
einfo ""
}