buildbot-worker-0.9.3-r1.ebuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. PYTHON_COMPAT=( python2_7 )
  5. EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
  6. [[ ${PV} == *9999 ]] && inherit git-r3
  7. inherit readme.gentoo user distutils-r1
  8. DESCRIPTION="BuildBot Slave Daemon"
  9. HOMEPAGE="http://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
  10. MY_V="${PV/_p/p}"
  11. MY_P="${PN}-${MY_V}"
  12. [[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. if [[ ${PV} == *9999 ]]; then
  16. KEYWORDS=""
  17. else
  18. KEYWORDS="~amd64"
  19. fi
  20. IUSE="test"
  21. RDEPEND=">=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
  22. || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
  23. >=dev-python/twisted-core-8.0.0[${PYTHON_USEDEP}]
  24. )
  25. dev-python/future[${PYTHON_USEDEP}]
  26. !<dev-util/buildbot-0.9.0_rc1
  27. "
  28. DEPEND="${RDEPEND}
  29. test? (
  30. dev-python/mock[${PYTHON_USEDEP}]
  31. dev-python/setuptools_trial[${PYTHON_USEDEP}]
  32. )
  33. "
  34. S="${WORKDIR}/${MY_P}"
  35. [[ ${PV} == *9999 ]] && S=${S}/slave
  36. pkg_setup() {
  37. enewuser buildbot
  38. DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
  39. to support starting buildbot_worker through Gentoo's init system. To use this,
  40. set up your build worker following the documentation, make sure the
  41. resulting directories are owned by the \"buildbot\" user and point
  42. \"${ROOT}etc/conf.d/buildbot_worker\" at the right location. The scripts can
  43. run as a different user if desired. If you need to run more than one
  44. build worker, just copy the scripts."
  45. }
  46. python_test() {
  47. distutils_install_for_testing
  48. esetup.py test || die "Tests failed under ${EPYTHON}"
  49. }
  50. python_install_all() {
  51. distutils-r1_python_install_all
  52. doman docs/buildbot-worker.1
  53. newconfd "${FILESDIR}/buildbot_worker.confd" buildbot_worker
  54. newinitd "${FILESDIR}/buildbot_worker.initd" buildbot_worker
  55. readme.gentoo_create_doc
  56. }
  57. pkg_postinst() {
  58. readme.gentoo_print_elog
  59. ewarn "conf.d and init.d files as 'buildslave', when it should have been"
  60. ewarn "'buildbot_worker' as it is in the previous 0.9 versions."
  61. ewarn "Only the 0.8 and previous versions should use the name 'buildslave'"
  62. }