Use https by default
[gentoo.git] / app-portage / gentoolkit / gentoolkit-0.3.0.9-r2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 PYTHON_COMPAT=(python{2_7,3_3,3_4} pypy)
8 PYTHON_REQ_USE="xml(+)"
9
10 inherit distutils-r1
11
12 DESCRIPTION="Collection of administration scripts for Gentoo"
13 HOMEPAGE="https://www.gentoo.org/proj/en/portage/tools/index.xml"
14 SRC_URI="mirror://gentoo/${P}.tar.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 IUSE=""
19
20 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21
22 DEPEND="sys-apps/portage[${PYTHON_USEDEP}]"
23 RDEPEND="${DEPEND}
24         !<=app-portage/gentoolkit-dev-0.2.7
25         || ( >=sys-apps/coreutils-8.15 app-misc/realpath sys-freebsd/freebsd-bin )
26         sys-apps/gawk
27         sys-apps/gentoo-functions
28         sys-apps/grep"
29
30 PATCHES=(
31         "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-1.patch
32         "${FILESDIR}"/${PV}-revdep-rebuild-py-504654-2.patch
33         "${FILESDIR}"/${PV}-equery-508114.patch
34         "${FILESDIR}"/${PV}-equery-strip-XXXFLAGS.patch
35         "${FILESDIR}"/${PV}-revdep-rebuild-526400.patch
36 )
37
38 python_prepare_all() {
39         python_setup
40         echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
41         VERSION="${PVR}" "${PYTHON}" setup.py set_version
42         mv ./bin/revdep-rebuild{,.py} || die
43         distutils-r1_python_prepare_all
44 }
45
46 python_install_all() {
47         distutils-r1_python_install_all
48
49         # Rename the python versions of revdep-rebuild, since we are not ready
50         # to switch to the python version yet. Link /usr/bin/revdep-rebuild to
51         # revdep-rebuild.sh. Leaving the python version available for potential
52         # testing by a wider audience.
53         dosym revdep-rebuild.sh /usr/bin/revdep-rebuild
54
55         # TODO: Fix this as it is now a QA violation
56         # Create cache directory for revdep-rebuild
57         keepdir /var/cache/revdep-rebuild
58         use prefix || fowners root:0 /var/cache/revdep-rebuild
59         fperms 0700 /var/cache/revdep-rebuild
60
61         # remove on Gentoo Prefix platforms where it's broken anyway
62         if use prefix; then
63                 elog "The revdep-rebuild command is removed, the preserve-libs"
64                 elog "feature of portage will handle issues."
65                 rm "${ED}"/usr/bin/revdep-rebuild*
66                 rm "${ED}"/usr/share/man/man1/revdep-rebuild.1
67                 rm -rf "${ED}"/etc/revdep-rebuild
68                 rm -rf "${ED}"/var
69         fi
70 }
71
72 pkg_postinst() {
73         # Only show the elog information on a new install
74         if [[ ! ${REPLACING_VERSIONS} ]]; then
75                 elog
76                 elog "For further information on gentoolkit, please read the gentoolkit"
77                 elog "guide: https://www.gentoo.org/doc/en/gentoolkit.xml"
78                 elog
79                 elog "Another alternative to equery is app-portage/portage-utils"
80                 elog
81                 elog "Additional tools that may be of interest:"
82                 elog
83                 elog "    app-admin/eclean-kernel"
84                 elog "    app-portage/diffmask"
85                 elog "    app-portage/flaggie"
86                 elog "    app-portage/install-mask"
87                 elog "    app-portage/portpeek"
88                 elog "    app-portage/smart-live-rebuild"
89         fi
90 }