updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / shinken / PKGBUILD
blobae43d64587c20e7eb5ffa89dbff9202dab301e43
1 # Maintainer: Julien "Adyxax" Dessaux <judessaux@gmail.com>
2 pkgname='shinken'
3 pkgver='0.6'
4 pkgrel='1'
5 pkgdesc='Shinken is a new powerful monitoring tool compatible with NagiosĀ® and written in python that enables organizations to identify and resolve IT problems before they impact the business.'
6 arch=('any')
7 url='http://www.shinken-monitoring.org/'
8 license=('GPL3')
9 groups=()
10 depends=('python' 'python2' 'python-pyro')
11 makedepends=('setuptools')
12 optdepends=('nagios-plugins: various monitoring checks'
13             'nagcon: a simple yet great curses interface over nagios style status.dat file')
14 provides=('shinken')
15 conflicts=()
16 replaces=()
17 backup=()
18 options=()
19 install=('shinken.install')
20 changelog=
21 source=("http://shinken-monitoring.org/pub/$pkgname-$pkgver.tar.gz" 'shinken.install' 'shinken.setup_parameters')
22 noextract=()
23 md5sums=('296b37db6799915ae9822e48670c5c20'
24          '564726b4d34f9522ba31e152fe2c228e'
25          '85d8cb4b28662f83df26a3da05e2f4ff')
27 build() {
28   cp -f shinken.setup_parameters "$srcdir/$pkgname-$pkgver/setup_parameters"
29   cd "$srcdir/$pkgname-$pkgver"
31   find ./ -name '*.py' -exec sed -r 's/^#!\/usr\/bin\/env python2.6$/#!\/usr\/bin\/env python2.7/' -i {} \;
32   find ./ -type f -exec sed -r 's/\/etc\/init.d/\/etc\/rc.d/' -i {} \;
35 package() {
36   cd "$srcdir/$pkgname-$pkgver"
38   python2 setup.py install --root=$pkgdir/
39   mv $pkgdir/etc/init.d $pkgdir/etc/rc.d
40   rm $pkgdir/etc/shinken/{brokerd-windows.ini,nagios-windows.cfg,pollerd-windows.ini,schedulerd-windows.ini}
41   find $pkgdir/etc/ -type f -exec sed -i 's!'$pkgdir'!!g' {} \;
42   sed -i 's!/usr/lib/nagios/plugins!/usr/share/nagios/libexec!g' $pkgdir/etc/shinken/resource.cfg
43   sed -i 's!modules.*Livestatus, Simple-log!modules Status-Dat, Simple-log!' $pkgdir/etc/shinken/shinken-specific.cfg
44   sed -i 's!log_end_msg [01]!echo !' $pkgdir/etc/rc.d/shinken
45   rm $pkgdir/var/lib/shinken/void_for_git
46   mkdir $pkgdir/var/lib/shinken/rw
49 # vim:set ts=2 sw=2 et: