cloud-init-0.7.6_p1212.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. BZRTGZ=1
  6. inherit distutils-r1 eutils multilib systemd
  7. DESCRIPTION="EC2 initialisation magic"
  8. HOMEPAGE="https://launchpad.net/cloud-init"
  9. if [ "x$BZRTGZ" != x1 ]; then
  10. SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
  11. else
  12. # Launchpad does not provide consistent checksums https://bugs.launchpad.net/launchpad/+bug/1576338
  13. # SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${P}.tar.gz"
  14. SRC_URI="mirror://gentoo/${P}.tar.gz http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.gz"
  15. S="${WORKDIR}/~cloud-init-dev/cloud-init/trunk/"
  16. fi
  17. LICENSE="GPL-3"
  18. SLOT="0"
  19. KEYWORDS="~amd64 ~x86"
  20. IUSE="test"
  21. CDEPEND="
  22. dev-python/cheetah[${PYTHON_USEDEP}]
  23. dev-python/configobj[${PYTHON_USEDEP}]
  24. dev-python/jinja[${PYTHON_USEDEP}]
  25. dev-python/jsonpatch[${PYTHON_USEDEP}]
  26. dev-python/oauth[${PYTHON_USEDEP}]
  27. dev-python/prettytable[${PYTHON_USEDEP}]
  28. dev-python/pyserial[${PYTHON_USEDEP}]
  29. dev-python/pyyaml[${PYTHON_USEDEP}]
  30. dev-python/requests[${PYTHON_USEDEP}]
  31. "
  32. DEPEND="
  33. dev-python/setuptools[${PYTHON_USEDEP}]
  34. test? (
  35. ${CDEPEND}
  36. >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
  37. dev-python/mocker[${PYTHON_USEDEP}]
  38. dev-python/nose[${PYTHON_USEDEP}]
  39. ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}]
  40. dev-python/pyflakes[${PYTHON_USEDEP}]
  41. sys-apps/iproute2
  42. )
  43. "
  44. RDEPEND="
  45. ${CDEPEND}
  46. sys-fs/growpart
  47. virtual/logger
  48. "
  49. PATCHES=( "${FILESDIR}/cloud-init-0.7.6_p1212-gentoo.patch" )
  50. python_prepare_all() {
  51. distutils-r1_python_prepare_all
  52. }
  53. python_test() {
  54. emake test
  55. }
  56. python_install() {
  57. distutils-r1_python_install "--init-system=sysvinit_openrc"
  58. }
  59. python_install_all() {
  60. keepdir /etc/cloud
  61. distutils-r1_python_install_all
  62. insinto /etc/cloud/templates
  63. doins "${FILESDIR}/hosts.gentoo.tmpl"
  64. insinto /etc/cloud
  65. doins "${FILESDIR}/cloud.cfg"
  66. }