buildbot-worker-0.9.2-r1.ebuild 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. if [[ ${PV} != *9999 ]]; then
  13. SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz
  14. http://dev.gentoo.org/~dolsen/distfiles/buildbot_worker-9-tests.tar.xz"
  15. fi
  16. LICENSE="GPL-2"
  17. SLOT="0"
  18. if [[ ${PV} == *9999 ]]; then
  19. KEYWORDS=""
  20. else
  21. KEYWORDS="~amd64"
  22. fi
  23. IUSE="test"
  24. RDEPEND=">=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
  25. || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
  26. >=dev-python/twisted-core-8.0.0[${PYTHON_USEDEP}]
  27. )
  28. dev-python/future[${PYTHON_USEDEP}]
  29. !<dev-util/buildbot-0.9.0_rc1
  30. "
  31. DEPEND="${RDEPEND}
  32. test? (
  33. dev-python/mock[${PYTHON_USEDEP}]
  34. dev-python/setuptools_trial[${PYTHON_USEDEP}]
  35. )
  36. "
  37. S="${WORKDIR}/${MY_P}"
  38. [[ ${PV} == *9999 ]] && S=${S}/slave
  39. pkg_setup() {
  40. enewuser buildbot
  41. DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
  42. to support starting buildbot_worker through Gentoo's init system. To use this,
  43. set up your build worker following the documentation, make sure the
  44. resulting directories are owned by the \"buildbot\" user and point
  45. \"${ROOT}etc/conf.d/buildbot_worker\" at the right location. The scripts can
  46. run as a different user if desired. If you need to run more than one
  47. build worker, just copy the scripts."
  48. }
  49. src_unpack() {
  50. unpack ${MY_P}.tar.gz
  51. cd ${MY_P}
  52. unpack buildbot_worker-9-tests.tar.xz
  53. }
  54. src_prepare() {
  55. epatch "${FILESDIR}"/buildbot-worker-0.9.Addmissedtests.patch
  56. }
  57. python_test() {
  58. distutils_install_for_testing
  59. esetup.py test || die "Tests failed under ${EPYTHON}"
  60. }
  61. python_install_all() {
  62. distutils-r1_python_install_all
  63. doman docs/buildbot-worker.1
  64. newconfd "${FILESDIR}/buildbot_worker.confd" buildbot_worker
  65. newinitd "${FILESDIR}/buildbot_worker.initd" buildbot_worker
  66. readme.gentoo_create_doc
  67. }
  68. pkg_postinst() {
  69. readme.gentoo_print_elog
  70. ewarn "The 0.9.2 and 0.9.3 original ebuilds had a mistake naming the"
  71. ewarn "conf.d and init.d files as 'buildslave', when it should have been"
  72. ewarn "'buildbot_worker' as it is in the previous 0.9 versions."
  73. ewarn "Only the 0.8 and previous versions should use the name 'buildslave'"
  74. }