openstack-guest-agents-unix-1.39.1.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools eutils python-single-r1 vcs-snapshot
  6. DESCRIPTION="Openstack Unix Guest Agent"
  7. HOMEPAGE="https://github.com/rackerlabs/openstack-guest-agents-unix"
  8. SRC_URI="https://github.com/rackerlabs/${PN}/tarball/${PV} -> ${P}.tar.gz"
  9. LICENSE="Apache-2.0"
  10. SLOT="0"
  11. KEYWORDS="~amd64"
  12. IUSE="test"
  13. CDEPEND="
  14. dev-python/pycrypto[${PYTHON_USEDEP}]
  15. dev-python/pyxenstore[${PYTHON_USEDEP}]
  16. dev-util/patchelf
  17. ${PYTHON_DEPS}
  18. "
  19. DEPEND="
  20. ${CDEPEND}
  21. test? (
  22. dev-python/mox[${PYTHON_USEDEP}]
  23. dev-python/unittest2[${PYTHON_USEDEP}]
  24. )
  25. "
  26. RDEPEND="${CDEPEND}"
  27. pkg_setup() {
  28. python-single-r1_pkg_setup
  29. }
  30. src_prepare() {
  31. epatch \
  32. "${FILESDIR}"/4453b4773688eef6c60736d9cf07100716308a5e.patch \
  33. "${FILESDIR}"/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch
  34. # Note: https://github.com/rackerlabs/openstack-guest-agents-unix/issues/52
  35. ebegin 'patching tests/test_injectfile.py'
  36. sed \
  37. -e '97,127 d' \
  38. -i tests/test_injectfile.py
  39. STATUS=$?
  40. eend ${STATUS}
  41. [[ ${STATUS} -gt 0 ]] && die
  42. eautoreconf
  43. }
  44. src_install() {
  45. emake DESTDIR="${D}" install
  46. doinitd scripts/gentoo/nova-agent
  47. }
  48. pkg_postinst() {
  49. elog "If you would like to utilize openstack-guest-agents-unix, add 'nova-agent' to"
  50. elog "your 'default' runlevel:"
  51. elog " rc-update add nova-agent default"
  52. }