etckeeper-1.18.1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2015 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 bash-completion-r1 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-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. newbashcomp bash_completion ${PN}
  41. dodoc doc/README.mdwn
  42. docinto examples
  43. newdoc "${FILESDIR}"/bashrc-r1 bashrc
  44. if use cron ; then
  45. exeinto /etc/cron.daily
  46. newexe debian/cron.daily etckeeper
  47. fi
  48. }
  49. pkg_postinst(){
  50. elog "${PN} supports the following VCS: ${VCS_DEPEND}"
  51. elog " dev-vcs/bzr"
  52. elog "This ebuild just ensures at least one is installed!"
  53. elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
  54. elog
  55. elog "You may want to adjust your /etc/portage/bashrc"
  56. elog "see the example file in /usr/share/doc/${PF}/examples"
  57. elog
  58. elog "To initialise your etc-dir as a repository run:"
  59. elog "${PN} init -d /etc"
  60. }