salt-api_PKGBUILD-git 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Maintainer: Christer Edwards <christer.edwards@gmail.com>
  2. pkgname=salt-api-git
  3. _gitname=salt-api
  4. pkgver=0.0.0
  5. pkgrel=1
  6. pkgdesc="Salt API is used to expose the fundamental aspects of Salt control to external sources."
  7. arch=('i686' 'x86_64')
  8. url="https://github.com/saltstack/salt-api"
  9. license=("APACHE")
  10. depends=('python2'
  11. 'salt')
  12. backup=()
  13. makedepends=('git')
  14. optdepends=()
  15. options=()
  16. conflicts=('salt-api')
  17. provides=('salt-api')
  18. # makepkg 4.1 knows about git and will pull main branch
  19. source=("git://github.com/saltstack/salt-api.git")
  20. # makepkg knows it's a git repo because the url starts with 'git'
  21. # it then knows to checkout the branch 'pacman41' upon cloning, expediting versioning.
  22. # branch="develop"
  23. # source=("git://github.com/saltstack/salt-api.git#branch=$branch")
  24. # makepkg also knows about tags
  25. #tags="v0.8.0"
  26. #source=("git://github.com/saltstack/salt-api.git#tag=$tag")
  27. # because the sources are not static, skip checksums
  28. md5sums=('SKIP')
  29. pkgver() {
  30. cd "$srcdir/$_gitname"
  31. echo $(git describe --always | sed 's/-/./g')
  32. # for git, if the repo has no tags, comment out the above and uncomment the next line:
  33. #echo "0.$(git rev-list --count $branch).$(git describe --always)"
  34. # This will give you a count of the total commits and the hash of the commit you are on.
  35. # Useful if you're making a repository with git packages so that they can have sequential
  36. # version numbers. (Else a pacman -Syu may not update the package)
  37. }
  38. #build() {
  39. # cd "${srcdir}/${_gitname}"
  40. # python2 setup.py build
  41. # no need to build setup.py install will do this
  42. #}
  43. package() {
  44. cd "${srcdir}/${_gitname}"
  45. export USE_SETUPTOOLS=true
  46. python2 setup.py install --root=${pkgdir}/ --optimize=1
  47. install -Dm644 ${srcdir}/salt-api/pkg/salt-api.service ${pkgdir}/usr/lib/systemd/system/salt-api.service
  48. # remove vcs leftovers
  49. find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  50. }