Use https by default
[gentoo.git] / app-portage / gentoolkit / gentoolkit-0.3.0.9.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})
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"
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/grep"
28
29 PATCHES=()
30
31 python_prepare_all() {
32         python_setup
33         echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
34         VERSION="${PVR}" "${PYTHON}" setup.py set_version
35         mv ./bin/revdep-rebuild{,.py} || die
36         distutils-r1_python_prepare_all
37 }
38
39 python_install_all() {
40         distutils-r1_python_install_all
41
42         # Rename the python versions of revdep-rebuild, since we are not ready
43         # to switch to the python version yet. Link /usr/bin/revdep-rebuild to
44         # revdep-rebuild.sh. Leaving the python version available for potential
45         # testing by a wider audience.
46         dosym revdep-rebuild.sh /usr/bin/revdep-rebuild
47
48         # TODO: Fix this as it is now a QA violation
49         # Create cache directory for revdep-rebuild
50         keepdir /var/cache/revdep-rebuild
51         use prefix || fowners root:0 /var/cache/revdep-rebuild
52         fperms 0700 /var/cache/revdep-rebuild
53
54         # remove on Gentoo Prefix platforms where it's broken anyway
55         if use prefix; then
56                 elog "The revdep-rebuild command is removed, the preserve-libs"
57                 elog "feature of portage will handle issues."
58                 rm "${ED}"/usr/bin/revdep-rebuild*
59                 rm "${ED}"/usr/share/man/man1/revdep-rebuild.1
60                 rm -rf "${ED}"/etc/revdep-rebuild
61                 rm -rf "${ED}"/var
62         fi
63 }
64
65 pkg_postinst() {
66         # Only show the elog information on a new install
67         if [[ ! ${REPLACING_VERSIONS} ]]; then
68                 elog
69                 elog "For further information on gentoolkit, please read the gentoolkit"
70                 elog "guide: https://www.gentoo.org/doc/en/gentoolkit.xml"
71                 elog
72                 elog "Another alternative to equery is app-portage/portage-utils"
73                 elog
74                 elog "Additional tools that may be of interest:"
75                 elog
76                 elog "    app-admin/eclean-kernel"
77                 elog "    app-portage/diffmask"
78                 elog "    app-portage/flaggie"
79                 elog "    app-portage/install-mask"
80                 elog "    app-portage/portpeek"
81                 elog "    app-portage/smart-live-rebuild"
82         fi
83 }