updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / puppet-git / PKGBUILD
blob31b242704f7ad70f5a328298dd73d1f4d2601c16
1 # Puppet: Installer: Arch
2 # Maintainer: Luca Cesari <mirshann (at) bewq (dot) org>
3 # Contributor: Thomas S Hatch <thatch45 (at) Gmail (dot) com>
4 # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
5 # Contributor: Miah Johnson <miah (at) chia-pet dot org>
6 # Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
8 pkgname=puppet-git
9 pkgver=20111004
10 pkgrel=1
11 pkgdesc="A system for automating system administration tasks."
12 arch=("any")
13 url="http://puppetlabs.com/projects/puppet/"
14 license=("GPL")
15 depends=("ruby" "ruby-shadow" "facter" "net-tools" "inetutils")
16 backup=("etc/puppet/puppet.conf")
17 options=(emptydirs)
18 install="puppet.install"
19 source=("puppet"
20         "puppetmaster"
21         "puppet.conf")
22 md5sums=('59dbf39e251bc4877e7604a5876c642d'
23          '4c507c580cb28d7a5adc9ea6b3626657'
24          'a6c0ce2eb12d62fdd3421aa9dff3477d')
26 _gitroot="https://github.com/puppetlabs/puppet.git"
27 _gitname="puppet.git"
29 build() {
30     cd ${srcdir}
31     msg "Connecting to git server..."
33     if [ -d ${srcdir}/${_gitname} ]; then
34         cd ${_gitname} && git pull origin
35         msg "The local files are updated."
36     else
37         git clone ${_gitroot} ${_gitname}
38     fi
40     msg "GIT checkout done or server timeout"
43 package() {
44   cd $srcdir/$_gitname
46   # Install
47   ruby ./install.rb \
48     --destdir=$pkgdir \
49     --bindir=/usr/bin \
50     --sbindir=/usr/sbin \
51     --mandir=/usr/share/man
53   # Set up vim and emacs
54   install -Dp -m0644 ext/vim/ftdetect/puppet.vim $pkgdir/usr/share/vim/vimfiles/ftdetect/puppet.vim
55   install -Dp -m0644 ext/vim/syntax/puppet.vim $pkgdir/usr/share/vim/vimfiles/syntax/puppet.vim
56   install -Dp -m0644 ext/emacs/puppet-mode.el $pkgdir/usr/share/emacs/site-lisp/puppet-mode.el
57   install -Dp -m0644 ext/emacs/puppet-mode-init.el $pkgdir/usr/share/emacs/site-lisp/site-start.d/puppet-mode-init.el
58   
59   # Configuration and rc scripts
60   install -d $pkgdir/etc/{puppet,rc.d}
61   install -m 644 $srcdir/puppet.conf $pkgdir/etc/puppet/puppet.conf
63   install -D $srcdir/puppet $pkgdir/etc/rc.d/puppet
64   install -D $srcdir/puppetmaster $pkgdir/etc/rc.d/puppetmaster
66   # Move pi to prevent file conflict
67   mv $pkgdir/usr/bin/pi $pkgdir/usr/bin/puppet-pi