Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD salt-api-git

By: a guest on Mar 22nd, 2013  |  syntax: None  |  size: 1.13 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Christer Edwards <christer.edwards@gmail.com>
  2.  
  3. pkgname=salt-api-git
  4. pkgver=20130322
  5. pkgrel=2
  6. pkgdesc="Salt API is used to expose the fundamental aspects of Salt control to external sources."
  7. arch=(any)
  8. url="https://github.com/saltstack/salt-api"
  9. license=("APACHE")
  10. depends=('python2'
  11.          'salt')
  12.  
  13. backup=()
  14.  
  15. makedepends=('git')
  16. optdepends=()
  17. options=()
  18. conflicts=('salt-api')
  19. provides=('salt-api')
  20. md5sums=()
  21.  
  22. _gitroot="https://github.com/saltstack/salt-api.git"
  23. _gitname="salt-api"
  24.  
  25. build() {
  26.   cd ${srcdir}
  27.   msg "Connecting to GIT server...."
  28.  
  29.   if [ -d ${_gitname} ] ; then
  30.     cd ${_gitname} && git pull origin
  31.     msg "The local files are updated."
  32.   else
  33.     git clone ${_gitroot} ${_gitname}
  34.   fi
  35.  
  36.   msg "GIT checkout done or server timeout"
  37.   msg "Starting make..."
  38.  
  39.   rm -rf ${srcdir}/${_gitname}-build
  40.   git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
  41.  
  42. }
  43.  
  44. package() {
  45.   cd ${srcdir}/${_gitname}-build
  46.  
  47.   python2 setup.py install --root=${pkgdir}/ --optimize=1
  48.  
  49.   install -Dm644 ${srcdir}/salt-api/pkg/salt-api.service ${pkgdir}/usr/lib/systemd/system/salt-api.service
  50.  
  51. }
clone this paste RAW Paste Data