etckeeper-1.18.6.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils prefix python-r1
  6. DESCRIPTION="A collection of tools to let /etc be stored in a repository"
  7. HOMEPAGE="https://etckeeper.branchable.com/"
  8. SRC_URI="https://github.com/joeyh/etckeeper/archive/${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. KEYWORDS="~amd64 ~arm ~x86"
  11. SLOT="0"
  12. IUSE="bazaar cron"
  13. REQUIRED_USE="bazaar? ( ${PYTHON_REQUIRED_USE} )"
  14. VCS_DEPEND="dev-vcs/git
  15. dev-vcs/mercurial
  16. dev-vcs/darcs"
  17. DEPEND="bazaar? ( dev-vcs/bzr )"
  18. RDEPEND="${DEPEND}
  19. app-portage/portage-utils
  20. cron? ( virtual/cron )
  21. bazaar? ( ${PYTHON_DEPS} )
  22. !bazaar? ( || ( ${VCS_DEPEND} ) )"
  23. PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
  24. src_compile() {
  25. :
  26. }
  27. src_install(){
  28. emake DESTDIR="${ED}" install
  29. bzr_install() {
  30. ${PYTHON} ./${PN}-bzr/__init__.py install --root="${ED}" ||
  31. die "bzr support installation failed!"
  32. }
  33. use bazaar && python_foreach_impl bzr_install
  34. if use prefix; then
  35. doenvd "${FILESDIR}"/99${PN}
  36. eprefixify "${ED%/}"/etc/env.d/99${PN}
  37. fi
  38. dodoc doc/README.mdwn
  39. docinto examples
  40. newdoc "${FILESDIR}"/bashrc-r1 bashrc
  41. if use cron ; then
  42. exeinto /etc/cron.daily
  43. newexe debian/cron.daily etckeeper
  44. fi
  45. }
  46. pkg_postinst(){
  47. elog "${PN} supports the following VCS: ${VCS_DEPEND}"
  48. elog " dev-vcs/bzr"
  49. elog "This ebuild just ensures at least one is installed!"
  50. elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
  51. elog
  52. elog "You may want to adjust your /etc/portage/bashrc"
  53. elog "see the example file in /usr/share/doc/${PF}/examples"
  54. elog
  55. elog "To initialise your etc-dir as a repository run:"
  56. elog "${PN} init -d /etc"
  57. }