summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/hobbitmon/PKGBUILD
blob: 52333b6ed6de658806c4c1f002ef2bb2702c8967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
pkgname=hobbitserver
provides=hobbit
pkgver=4.2.0
pkgrel=99
pkgdesc="Hobbit is a system for monitoring servers and networks. "
license="GPL"
arch=('i686')

url="http://hobbitmon.sourceforge.net/"
source=(http://voxel.dl.sourceforge.net/sourceforge/hobbitmon/hobbit-4.2.0.tar.gz  hobbitadd.py hobbitcheck.sh hobbitgraph.cfg.diff hobbitserver.cfg.diff hobbitlaunch.cfg.diff clientlaunch.cfg.diff hobbitstorage.py  hbnotes.py hobbit-myth-orphan.sh hobbit-clients.cfg hbfunc.py be.png tuner.png tv.png  hobbit-mem-myth.sh hobbit_notify.sh hobbit-alerts.cfg hobbit_myth_data.py)
depends=(rrdtool fping pcre python graphviz)
install=hobbit.install

build() {
cd $startdir/src/hobbit-$pkgver
ENABLESSL=n \
ENABLELDAP=n \
ENABLELDAPSSL=n \
BBUSER=nobody \
BBTOPDIR=/data/srv/hobbit \
BBVAR=/data/srv/hobbit/var \
BBHOSTURL=/hobbit \
CGIDIR=/data/srv/httpd/htdocs/hobbit/hobbit-cgi \
BBCGIURL=/hobbit/hobbit-cgi \
SECURECGIDIR=/data/srv/httpd/htdocs/hobbit/hobbit-seccgi \
SECUREBBCGIURL=/hobbit/hobbit-seccgi \
HTTPDGID=nobody \
BBLOGDIR=/var/log/hobbit \
BBHOSTNAME=localhost \
BBHOSTIP=127.0.0.1 \
MANROOT=/usr/share/man \
BARS=all \
USENEWHIST=y \
PIXELCOUNT=960 \
INSTALLBINDIR=/data/srv/hobbit/server/bin \
INSTALLETCDIR=/data/srv/hobbit/etc \
INSTALLWEBDIR=/data/srv/hobbit/web \
INSTALLEXTDIR=/data/srv/hobbit/server/ext \
INSTALLTMPDIR=/data/srv/hobbit/tmp \
INSTALLWWWDIR=/data/srv/httpd/htdocs/hobbit/ \
USERFPING=/usr/sbin/fping \
./configure
	make PKGBUILD=1|| return 1
	make PKGBUILD=1 INSTALLROOT=$startdir/pkg install

cd $startdir/src
cp $startdir/src/hobbitadd.py  $startdir/pkg/data/srv/hobbit/server/bin/
install -D -m755 $startdir/src/hobbitstorage.py  $startdir/pkg/data/srv/hobbit/server/ext/hobbitstorage.py
install -D -m755 $startdir/src/hobbit-myth-orphan.sh $startdir/pkg/data/srv/hobbit/server/ext/hobbit-myth-orphan.sh
install -D -m755 $startdir/src/hbfunc.py $startdir/pkg/data/srv/hobbit/server/ext/hbfunc.py
install -D -m755 $startdir/src/hbnotes.py $startdir/pkg/data/srv/hobbit/server/ext/hbnotes.py
    install -D -m755 $startdir/src/hobbit_myth_data.py $startdir/pkg/data/srv/hobbit/server/ext/hobbit_myth_data.py
install -D -m755 $startdir/src/hobbit-mem-myth.sh $startdir/pkg/data/srv/hobbit/server/ext/hobbit-mem-myth.sh
install -D -m755  hobbitcheck.sh $startdir/pkg/etc/cron.tenminutes/hobbitcheck.sh
install  -m755 hobbit-clients.cfg $startdir/pkg/data/srv/hobbit/etc/hobbit-clients.cfg
install  -m755 hobbit-alerts.cfg $startdir/pkg/data/srv/hobbit/etc/hobbit-alerts.cfg
install  -m755 hobbit_notify.sh $startdir/pkg/data/srv/hobbit/server/bin/hobbit_notify.sh

install  -m755 $startdir/src/tv.png  $startdir/pkg/data/srv/httpd/htdocs/hobbit/gifs/tv.png
install  -m755 $startdir/src/tuner.png  $startdir/pkg/data/srv/httpd/htdocs/hobbit/gifs/tuner.png
install  -m755 $startdir/src/be.png  $startdir/pkg/data/srv/httpd/htdocs/hobbit/gifs/be.png


#apply patches to conf file

cd $startdir/pkg/data/srv/hobbit/etc
patch -p0 <  $startdir/src/hobbitgraph.cfg.diff
patch -p0 <  $startdir/src/hobbitserver.cfg.diff
patch -p0 <  $startdir/src/hobbitlaunch.cfg.diff


cd -
cd $startdir/pkg/data/srv/hobbit/client/etc
patch -p0 <  $startdir/src/clientlaunch.cfg.diff
cd -



#create client package as well
install -D -m755 $startdir/src/hobbit-mem-myth.sh $startdir/pkg/data/srv/hobbit/client/ext/hobbit-mem-myth.sh
cp -rp /$startdir/pkg/data/srv/hobbit/client $startdir/../hobbit-client

}