buildbot-worker-0.9.1.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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="0.9.1"
  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. DEPEND="${RDEPEND}
  28. test? ( dev-python/mock[${PYTHON_USEDEP}] )"
  29. S="${WORKDIR}/${MY_P}"
  30. [[ ${PV} == *9999 ]] && S=${S}/slave
  31. pkg_setup() {
  32. enewuser buildbot
  33. DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
  34. to support starting buildbot_worker through Gentoo's init system. To use this,
  35. set up your build worker following the documentation, make sure the
  36. resulting directories are owned by the \"buildbot\" user and point
  37. \"${ROOT}etc/conf.d/buildbot_worker\" at the right location. The scripts can
  38. run as a different user if desired. If you need to run more than one
  39. build worker, just copy the scripts."
  40. }
  41. python_install_all() {
  42. distutils-r1_python_install_all
  43. doman docs/buildbot-worker.1
  44. newconfd "${FILESDIR}/buildbot_worker.confd" buildbot_worker
  45. newinitd "${FILESDIR}/buildbot_worker.initd" buildbot_worker
  46. systemd_dounit "${FILESDIR}/buildbot_worker.service"
  47. readme.gentoo_create_doc
  48. }
  49. pkg_postinst() {
  50. readme.gentoo_print_elog
  51. }