Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Dec 4th, 2012  |  syntax: Bash  |  size: 2.30 KB  |  views: 25  |  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. pkgname=salt-git
  3. pkgver=$(date +%Y%m%d)
  4. pkgrel=1
  5. pkgdesc="A remote execution and communication system built on zeromq"
  6. arch=('any')
  7. url="https://github.com/saltstack/salt"
  8. license=('APACHE')
  9. groups=()
  10. depends=('python2'
  11.          'python2-pyzmq'
  12.          'python-m2crypto'
  13.          'python2-yaml'
  14.          'python2-crypto'
  15.          'python2-psutil'
  16.          'python2-jinja'
  17.          'python2-msgpack')
  18.  
  19. backup=('etc/salt/master'
  20.         'etc/salt/minion')
  21.  
  22. makedepends=('git')
  23. optdepends=()
  24. options=()
  25. conflicts=('salt')
  26.  
  27. source=("salt-master.service"
  28.         "salt-minion.service"
  29.         "salt-syndic.service"
  30.         "salt-master"
  31.         "salt-minion"
  32.         "salt-syndic")
  33.  
  34. md5sums=('3be813f49bf5ab9580cfc23e915eea4b'
  35.          '8ef6ab9bf9750f146d31bd8da9da963b'
  36.          '97e1daa0f7232f48d109b62890b68d0e'
  37.          '1594591acb0a266854186a694da21103'
  38.          '21ab2eac231e9f61bf002ba5f16f8a3d'
  39.          '09683ef4966e401761f7d2db6ad4b692')
  40.  
  41. _gitroot="git://github.com/saltstack/salt.git"
  42. _gitname="salt"
  43.  
  44. build() {
  45.   cd ${srcdir}
  46.   msg "Connecting to GIT server...."
  47.  
  48.   if [ -d ${_gitname} ] ; then
  49.     cd ${_gitname} && git pull origin
  50.     msg "The local files are updated."
  51.   else
  52.     git clone ${_gitroot} ${_gitname}
  53.   fi
  54.  
  55.   msg "GIT checkout done or server timeout"
  56.   msg "Starting make..."
  57.  
  58.   rm -rf ${srcdir}/${_gitname}-build
  59.   git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
  60.  
  61. }
  62.  
  63. package() {
  64.   cd ${srcdir}/${_gitname}-build
  65.  
  66.   python2 setup.py install --root=${pkgdir}/ --optimize=1
  67.  
  68.   mkdir -p $pkgdir/etc/rc.d/
  69.   cp ${srcdir}/salt-master ${pkgdir}/etc/rc.d/
  70.   cp ${srcdir}/salt-minion ${pkgdir}/etc/rc.d/
  71.   cp ${srcdir}/salt-syndic ${pkgdir}/etc/rc.d/
  72.   chmod +x $pkgdir/etc/rc.d/salt-{master,minion,syndic}
  73.  
  74.   install -Dm644 ${srcdir}/salt/pkg/salt-master.service ${pkgdir}/usr/lib/systemd/system/salt-master.service
  75.   install -Dm644 ${srcdir}/salt/pkg/salt-syndic.service ${pkgdir}/usr/lib/systemd/system/salt-syndic.service
  76.   install -Dm644 ${srcdir}/salt/pkg/salt-minion.service ${pkgdir}/usr/lib/systemd/system/salt-minion.service
  77.  
  78.   mkdir -p ${pkgdir}/etc/salt/
  79.   cp ${srcdir}/salt-build/conf/master ${pkgdir}/etc/salt/
  80.   cp ${srcdir}/salt-build/conf/minion ${pkgdir}/etc/salt/
  81. }
clone this paste RAW Paste Data