etckeeper-1.18.5.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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. src_prepare(){
  24. epatch "${FILESDIR}"/${PN}-1.18.3-gentoo.patch
  25. }
  26. src_compile() {
  27. :
  28. }
  29. src_install(){
  30. emake DESTDIR="${ED}" install
  31. bzr_install() {
  32. ${PYTHON} ./${PN}-bzr/__init__.py install --root="${ED}" ||
  33. die "bzr support installation failed!"
  34. }
  35. use bazaar && python_foreach_impl bzr_install
  36. if use prefix; then
  37. doenvd "${FILESDIR}"/99${PN}
  38. eprefixify "${ED%/}"/etc/env.d/99${PN}
  39. fi
  40. dodoc doc/README.mdwn
  41. docinto examples
  42. newdoc "${FILESDIR}"/bashrc-r1 bashrc
  43. if use cron ; then
  44. exeinto /etc/cron.daily
  45. newexe debian/cron.daily etckeeper
  46. fi
  47. }
  48. pkg_postinst(){
  49. elog "${PN} supports the following VCS: ${VCS_DEPEND}"
  50. elog " dev-vcs/bzr"
  51. elog "This ebuild just ensures at least one is installed!"
  52. elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
  53. elog
  54. elog "You may want to adjust your /etc/portage/bashrc"
  55. elog "see the example file in /usr/share/doc/${PF}/examples"
  56. elog
  57. elog "To initialise your etc-dir as a repository run:"
  58. elog "${PN} init -d /etc"
  59. }