bcfg2-1.2.4-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. PYTHON_REQ_USE='ssl'
  6. inherit distutils-r1
  7. DESCRIPTION="Configuration management tool"
  8. HOMEPAGE="http://bcfg2.org"
  9. SRC_URI="ftp://ftp.mcs.anl.gov/pub/bcfg/${P}.tar.gz"
  10. LICENSE="BSD-2"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-solaris"
  13. IUSE="doc cheetah genshi server"
  14. DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
  15. doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
  16. RDEPEND="app-portage/gentoolkit[${PYTHON_USEDEP}]
  17. cheetah? ( dev-python/cheetah[${PYTHON_USEDEP}] )
  18. genshi? ( dev-python/genshi[${PYTHON_USEDEP}] )
  19. server? (
  20. dev-libs/libgamin[python,${PYTHON_USEDEP}]
  21. dev-python/lxml[${PYTHON_USEDEP}]
  22. dev-python/nose[${PYTHON_USEDEP}]
  23. !kernel_linux? ( virtual/fam ) )"
  24. python_compile_all() {
  25. if use doc; then
  26. einfo "Building Bcfg2 documentation"
  27. sphinx-build doc doc_output || die
  28. fi
  29. }
  30. python_install() {
  31. distutils-r1_python_install \
  32. --record=PY_SERVER_LIBS
  33. if ! use server; then
  34. rm -f "${ED%/}"/usr/bin/bcfg2-* || die
  35. rm -f "${D%/}$(python_get_scriptdir)"/bcfg2-* || die
  36. rm -rf "${ED%/}"/usr/share/bcfg2 || die
  37. rm -rf "${ED%/}"/usr/share/man/man8 || die
  38. else
  39. newinitd "${FILESDIR}/${PN}-server-1.2.0.rc" bcfg2-server
  40. fi
  41. insinto /etc
  42. doins examples/bcfg2.conf
  43. if use doc; then
  44. cd doc_output || die
  45. docinto html
  46. dodoc -r [a-z]* _images _static
  47. fi
  48. }
  49. pkg_postinst () {
  50. if use server; then
  51. einfo "If this is a new installation, you probably need to run:"
  52. einfo " bcfg2-admin init"
  53. fi
  54. }