Use https by default
[gentoo.git] / app-admin / eselect / eselect-1.3.8.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 inherit eutils bash-completion-r1
8
9 DESCRIPTION="Gentoo's multi-purpose configuration and management tool"
10 HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Eselect"
11 SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz"
12
13 LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-2.5 )"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
16 IUSE="doc emacs vim-syntax"
17
18 RDEPEND="sys-apps/sed
19         || (
20                 sys-apps/coreutils
21                 sys-freebsd/freebsd-bin
22                 app-misc/realpath
23         )"
24 DEPEND="${RDEPEND}
25         app-arch/xz-utils
26         doc? ( dev-python/docutils )"
27 RDEPEND="${RDEPEND}
28         sys-apps/file
29         sys-libs/ncurses"
30
31 PDEPEND="emacs? ( app-emacs/eselect-mode )
32         vim-syntax? ( app-vim/eselect-syntax )"
33
34 src_compile() {
35         emake
36         use doc && emake html
37 }
38
39 src_install() {
40         emake DESTDIR="${D}" install
41         newbashcomp misc/${PN}.bashcomp ${PN}
42         dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt
43         use doc && dohtml *.html doc/*
44
45         # needed by news module
46         keepdir /var/lib/gentoo/news
47         if ! use prefix; then
48                 fowners root:portage /var/lib/gentoo/news
49                 fperms g+w /var/lib/gentoo/news
50         fi
51 }
52
53 pkg_postinst() {
54         # fowners in src_install doesn't work for the portage group:
55         # merging changes the group back to root
56         if ! use prefix; then
57                 chgrp portage "${EROOT}/var/lib/gentoo/news" \
58                         && chmod g+w "${EROOT}/var/lib/gentoo/news"
59         fi
60 }