PKGBUILD-git 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Maintainer: Christer Edwards <christer.edwards@gmail.com>
  2. pkgname=salt-git
  3. _gitname="salt"
  4. pkgver=v0.14.0.504.g6fc4ee2
  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. backup=('etc/salt/master'
  20. 'etc/salt/minion')
  21. makedepends=('git')
  22. conflicts=('salt')
  23. provides=('salt')
  24. # makepkg 4.1 knows about git and will pull main branch
  25. source=("git://github.com/saltstack/salt.git")
  26. # makepkg knows it's a git repo because the url starts with 'git'
  27. # it then knows to checkout the branch upon cloning, expediating versioning.
  28. #branch="develop"
  29. #source=("git://github.com/saltstack/salt.git#branch=$branch")
  30. # makepkg also knows about tags
  31. #tags="v0.14.1"
  32. #source=("git://github.com/saltstack/salt.git#tag=$tag")
  33. # because the sources are not static, skip checksums
  34. md5sums=('SKIP')
  35. pkgver() {
  36. cd "$srcdir/$_gitname"
  37. echo $(git describe --always | sed 's/-/./g')
  38. # for git, if the repo has no tags, comment out the above and uncomment the next line:
  39. #echo "0.$(git rev-list --count $branch).$(git describe --always)"
  40. # This will give you a count of the total commits and the hash of the commit you are on.
  41. # Useful if you're making a repository with git packages so that they can have sequential
  42. # version numbers. (Else a pacman -Syu may not update the package)
  43. }
  44. #build() {
  45. # cd "${srcdir}/${_gitname}"
  46. # python2 setup.py build
  47. # no need to build setup.py install will do this
  48. #}
  49. package() {
  50. cd "${srcdir}/${_gitname}"
  51. python2 setup.py install --root=${pkgdir}/ --optimize=1
  52. install -Dm644 ${srcdir}/salt/pkg/arch/salt-master.service ${pkgdir}/usr/lib/systemd/system/salt-master.service
  53. install -Dm644 ${srcdir}/salt/pkg/arch/salt-syndic.service ${pkgdir}/usr/lib/systemd/system/salt-syndic.service
  54. install -Dm644 ${srcdir}/salt/pkg/arch/salt-minion.service ${pkgdir}/usr/lib/systemd/system/salt-minion.service
  55. mkdir -p ${pkgdir}/etc/salt/
  56. cp ${srcdir}/salt/conf/master ${pkgdir}/etc/salt/
  57. cp ${srcdir}/salt/conf/minion ${pkgdir}/etc/salt/
  58. # remove vcs leftovers
  59. find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  60. }