PKGBUILD 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Maintainer: Christer Edwards <christer.edwards@gmail.com>
  2. pkgname=salt-git
  3. _gitname="salt"
  4. pkgver=v0.15.0.1086.gfaf0bcf
  5. pkgrel=1
  6. pkgdesc="A remote execution and communication system built on zeromq"
  7. arch=('any')
  8. url="https://github.com/saltstack/salt"
  9. license=('APACHE')
  10. groups=()
  11. depends=('python2'
  12. 'python2-yaml'
  13. 'python2-jinja'
  14. 'python2-pyzmq'
  15. 'python2-crypto'
  16. 'python2-psutil'
  17. 'python2-msgpack'
  18. 'python2-m2crypto'
  19. 'logrotate'
  20. 'bash-completion')
  21. backup=('etc/salt/master'
  22. 'etc/salt/minion')
  23. makedepends=('git')
  24. conflicts=('salt')
  25. provides=('salt' 'bash-completion-salt')
  26. install="salt.install"
  27. # makepkg 4.1 knows about git and will pull main branch
  28. source=("git://github.com/saltstack/salt.git")
  29. # makepkg knows it's a git repo because the url starts with 'git'
  30. # it then knows to checkout the branch upon cloning, expediating versioning.
  31. #branch="develop"
  32. #source=("git://github.com/saltstack/salt.git#branch=$branch")
  33. # makepkg also knows about tags
  34. #tags="v0.14.1"
  35. #source=("git://github.com/saltstack/salt.git#tag=$tag")
  36. # because the sources are not static, skip checksums
  37. md5sums=('SKIP')
  38. pkgver() {
  39. cd "$srcdir/$_gitname"
  40. echo $(git describe --always | sed 's/-/./g')
  41. # for git, if the repo has no tags, comment out the above and uncomment the next line:
  42. #echo "0.$(git rev-list --count $branch).$(git describe --always)"
  43. # This will give you a count of the total commits and the hash of the commit you are on.
  44. # Useful if you're making a repository with git packages so that they can have sequential
  45. # version numbers. (Else a pacman -Syu may not update the package)
  46. }
  47. #build() {
  48. # cd "${srcdir}/${_gitname}"
  49. # python2 setup.py build
  50. # no need to build setup.py install will do this
  51. #}
  52. package() {
  53. cd "${srcdir}/${_gitname}"
  54. ## build salt
  55. python2 setup.py install --root=${pkgdir}/ --optimize=1
  56. ## install salt systemd service files
  57. install -Dm644 ${srcdir}/salt/pkg/arch/salt-master.service ${pkgdir}/usr/lib/systemd/system/salt-master.service
  58. install -Dm644 ${srcdir}/salt/pkg/arch/salt-syndic.service ${pkgdir}/usr/lib/systemd/system/salt-syndic.service
  59. install -Dm644 ${srcdir}/salt/pkg/arch/salt-minion.service ${pkgdir}/usr/lib/systemd/system/salt-minion.service
  60. ## install salt config files
  61. mkdir -p ${pkgdir}/etc/salt/master.d
  62. mkdir -p ${pkgdir}/etc/salt/minion.d
  63. cp ${srcdir}/salt/conf/master ${pkgdir}/etc/salt/
  64. cp ${srcdir}/salt/conf/minion ${pkgdir}/etc/salt/
  65. ## install logrotate:
  66. mkdir -p ${pkgdir}/etc/logrotate.d/
  67. install -Dm644 ${srcdir}/salt/pkg/salt-common.logrotate ${pkgdir}/etc/logrotate.d/salt
  68. ## install bash-completion
  69. mkdir -p ${pkgdir}/usr/share/bash-completion/completion/
  70. install -Dm644 ${srcdir}/salt/pkg/salt.bash ${pkgdir}/usr/share/bash-completion/completion/salt
  71. # remove vcs leftovers
  72. find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  73. }