]> git.bzium.org/ - embe/overlay.git/blob - app-portage/eix/eix-9999.ebuild
eclass/autotools.eclass: zmiany już są w gentoo.git
[embe/overlay.git] / app-portage / eix / eix-9999.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 EGIT_REPO_URI="https://github.com/vaeth/eix.git"
7
8 WANT_LIBTOOL="none"
9
10 PLOCALES="de ru"
11 inherit autotools git-r3 bash-completion-r1 eutils l10n
12
13 DESCRIPTION="Search and query ebuilds, portage incl. local settings, ext. overlays, version changes, and more"
14 HOMEPAGE="https://github.com/vaeth/eix/"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS=""
19 IUSE="debug +dep doc nls optimization security strong-optimization strong-security sqlite swap-remote tools"
20
21 BOTHDEPEND="sqlite? ( >=dev-db/sqlite-3 )
22         nls? ( virtual/libintl )"
23 RDEPEND="${BOTHDEPEND}
24         app-shells/push"
25 DEPEND="${BOTHDEPEND}
26         doc? ( dev-python/docutils )
27         >=sys-devel/gettext-0.18.3"
28
29 src_prepare() {
30         sed -i -e "s'/'${EPREFIX}/'" -- "${S}"/tmpfiles.d/eix.conf
31         epatch_user
32         eautoreconf
33 }
34
35 src_configure() {
36         econf $(use_with sqlite) $(use_with doc extra-doc) \
37                 $(use_enable nls) $(use_enable tools separate-tools) \
38                 $(use_enable security) $(use_enable optimization) \
39                 $(use_enable strong-security) \
40                 $(use_enable strong-optimization) $(use_enable debug debugging) \
41                 $(use_enable swap-remote) \
42                 $(use_with prefix always-accept-keywords) \
43                 $(use_with dep dep-default) \
44                 --with-zsh-completion \
45                 --with-portage-rootpath="${ROOTPATH}" \
46                 --with-eprefix-default="${EPREFIX}" \
47                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
48                 --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
49 }
50
51 src_install() {
52         default
53         dobashcomp bash/eix
54         insinto "/usr/lib/tmpfiles.d"
55         doins tmpfiles.d/eix.conf
56 }
57
58 pkg_postinst() {
59         test -d "${EROOT}var/cache/${PN}" || {
60                 mkdir "${EROOT}var/cache/${PN}"
61                 use prefix || chown portage:portage "${EROOT}var/cache/${PN}"
62         }
63         local obs="${EROOT}var/cache/eix.previous"
64         ! test -f "${obs}" || ewarn "Found obsolete ${obs}, please remove it"
65 }
66
67 pkg_postrm() {
68         [ -n "${REPLACED_BY_VERSION}" ] || rm -rf -- "${EROOT}var/cache/${PN}"
69 }