net-dns/coredns: Remove old
[gentoo.git] / app-portage / repoman / repoman-2.3.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
7 PYTHON_REQ_USE='bzip2(+)'
8
9 inherit distutils-r1
10
11 if [[ ${PV} == 9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage.git"
14         S="${WORKDIR}/${P}/repoman"
15 else
16         SRC_URI="https://dev.gentoo.org/~dolsen/releases/${PN}/${P}.tar.bz2"
17         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 fi
19
20 DESCRIPTION="Repoman is a Quality Assurance tool for Gentoo ebuilds"
21 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
22
23 LICENSE="GPL-2"
24 SLOT="0"
25 IUSE=""
26
27 RDEPEND="
28         >=sys-apps/portage-2.3.0_rc[${PYTHON_USEDEP}]
29         >=dev-python/lxml-3.6.0[${PYTHON_USEDEP}]
30 "
31 DEPEND="${RDEPEND}"
32
33 python_prepare_all() {
34         distutils-r1_python_prepare_all
35
36         if [[ -n "${EPREFIX}" ]] ; then
37                 einfo "Prefixing shebangs ..."
38
39                 local file
40                 while read -r -d $'\0' file; do
41                         local shebang=$(head -n1 "${file}")
42
43                         if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then
44                                 sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "${file}" || \
45                                         die "sed failed"
46                         fi
47                 done < <(find . -type f -print0)
48         fi
49 }
50
51 python_test() {
52         esetup.py test
53 }
54
55 python_install() {
56         # Install sbin scripts to bindir for python-exec linking
57         # they will be relocated in pkg_preinst()
58         distutils-r1_python_install \
59                 --system-prefix="${EPREFIX}/usr" \
60                 --bindir="$(python_get_scriptdir)" \
61                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
62                 --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
63                 --sbindir="$(python_get_scriptdir)" \
64                 --sysconfdir="${EPREFIX}/etc" \
65                 "${@}"
66 }
67
68 pkg_postinst() {
69         einfo ""
70         einfo "This release of repoman is from the new portage/repoman split"
71         einfo "release code base."
72         einfo "This new repoman code base is still being developed.  So its API's"
73         einfo "are not to be considered stable and are subject to change."
74         einfo "The code released has been tested and considered ready for use."
75         einfo "This however does not guarantee it to be completely bug free."
76         einfo "Please report any bugs you may encounter."
77         einfo ""
78 }