eselect-9999.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. EGIT_REPO_URI="git://anongit.gentoo.org/proj/eselect.git"
  5. inherit autotools git-r3 bash-completion-r1
  6. DESCRIPTION="Gentoo's multi-purpose configuration and management tool"
  7. HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Eselect"
  8. LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-2.5 )"
  9. SLOT="0"
  10. IUSE="doc emacs vim-syntax"
  11. RDEPEND="sys-apps/sed
  12. || (
  13. sys-apps/coreutils
  14. sys-freebsd/freebsd-bin
  15. app-misc/realpath
  16. )"
  17. DEPEND="${RDEPEND}
  18. doc? ( dev-python/docutils )"
  19. RDEPEND="${RDEPEND}
  20. sys-apps/file
  21. sys-libs/ncurses:0"
  22. PDEPEND="emacs? ( app-emacs/eselect-mode )
  23. vim-syntax? ( app-vim/eselect-syntax )"
  24. src_prepare() {
  25. eautoreconf
  26. }
  27. src_compile() {
  28. emake
  29. use doc && emake html
  30. }
  31. src_install() {
  32. emake DESTDIR="${D}" install
  33. newbashcomp misc/${PN}.bashcomp ${PN}
  34. dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt
  35. use doc && dohtml *.html doc/*
  36. # needed by news module
  37. keepdir /var/lib/gentoo/news
  38. if ! use prefix; then
  39. fowners root:portage /var/lib/gentoo/news
  40. fperms g+w /var/lib/gentoo/news
  41. fi
  42. }
  43. pkg_postinst() {
  44. # fowners in src_install doesn't work for the portage group:
  45. # merging changes the group back to root
  46. if ! use prefix; then
  47. chgrp portage "${EROOT}/var/lib/gentoo/news" \
  48. && chmod g+w "${EROOT}/var/lib/gentoo/news"
  49. fi
  50. }