eselect-1.4.9.ebuild 1.6 KB

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