blob: f1718316c608448aa2502b9905b34b9e733538a1 (
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
pkgbase=xymon
pkgname=('xymonserver' 'xymonclient')
pkgver=4.3.17
pkgrel=12
pkgdesc="Xymon is a system for monitoring of hosts and networks"
license="GPL"
arch=('i686' 'x86_64')
url="http://www.xymon.com/"
source=("https://downloads.sourceforge.net/project/xymon/Xymon/$pkgver/$pkgbase-$pkgver.tar.gz"
'hobbitadd.py'
'xymon_ghost_check'
'graph.cfg.diff'
'xymonserver.cfg.diff'
'tasks.d.mv'
'clientlaunch.cfg.patch'
'hobbitstorage.py'
'hbnotes.py'
'hobbit-myth-orphan.sh'
'analysis.cfg'
'hbfunc.py'
'be.png' 'tuner.png' 'tv.png'
'hobbit-mem-myth.sh'
'hobbit_notify.sh'
'login_notify.sh'
'alerts.cfg'
'hobbit_myth_data.py'
'xymon-gputemp.sh'
'xymon-smart.sh'
'logrotate-server.xymon'
'logrotate-client.xymon'
'log_list.sh'
'client-local.cfg.patch'
'led_themes.tar.gz'
'xymon-server.rules'
'xymon-client.rules'
'hosts.cfg.patch')
depends=('rrdtool' 'fping' 'pcre' 'python2' 'graphviz' 'smartmontools')
install=xymon.install
build() {
cd ${srcdir}/xymon-$pkgver
ENABLESSL=n \
ENABLELDAP=n \
ENABLELDAPSSL=n \
XYMONUSER=nobody \
XYMONTOPDIR=/home/xymon \
XYMONVAR=/home/xymon/var \
XYMONHOSTURL=/xymon \
CGIDIR=/data/srv/httpd/htdocs/xymon/hobbit-cgi \
XYMONCGIURL=/xymon/hobbit-cgi \
SECURECGIDIR=/data/srv/httpd/htdocs/xymon/hobbit-seccgi \
SECUREXYMONCGIURL=/xymon/hobbit-seccgi \
HTTPDGID=nobody \
XYMONLOGDIR=/var/log/hobbit \
XYMONHOSTNAME=localhost \
XYMONHOSTIP=127.0.0.1 \
MANROOT=/usr/share/man \
BARS=all \
USENEWHIST=y \
PIXELCOUNT=960 \
INSTALLBINDIR=/home/xymon/server/bin \
INSTALLETCDIR=/home/xymon/etc \
INSTALLWEBDIR=/home/xymon/web \
INSTALLEXTDIR=/home/xymon/server/ext \
INSTALLTMPDIR=/home/xymon/tmp \
INSTALLWWWDIR=/data/srv/httpd/htdocs/xymon/ \
./configure
make PKGBUILD=1|| return 1
}
package_xymonserver(){
backup=('data/srv/xymon/etc/hosts.cfg')
cd ${srcdir}/xymon-$pkgver
make PKGBUILD=1 INSTALLROOT=${pkgdir} install
cd ${srcdir}
install -D -m400 ${srcdir}/xymon-server.rules ${pkgdir}/etc/sudoers.d/xymon_server
install -D -m755 ${srcdir}/hobbitadd.py ${pkgdir}/home/xymon/server/bin/hobbitadd.py
install -D -m755 ${srcdir}/hobbitstorage.py ${pkgdir}/home/xymon/server/ext/hobbitstorage.py
install -D -m755 ${srcdir}/hobbit-myth-orphan.sh ${pkgdir}/home/xymon/server/ext/hobbit-myth-orphan.sh
install -D -m755 ${srcdir}/hbfunc.py ${pkgdir}/home/xymon/server/ext/hbfunc.py
install -D -m755 ${srcdir}/hbnotes.py ${pkgdir}/home/xymon/server/ext/hbnotes.py
install -D -m755 ${srcdir}/hobbit_myth_data.py ${pkgdir}/home/xymon/server/ext/hobbit_myth_data.py
install -D -m755 ${srcdir}/hobbit-mem-myth.sh ${pkgdir}/home/xymon/server/ext/hobbit-mem-myth.sh
install -D -m755 ${srcdir}/xymon-gputemp.sh ${pkgdir}/home/xymon/server/ext/xymon-gputemp.sh
install -D -m755 ${srcdir}/xymon-smart.sh ${pkgdir}/home/xymon/server/ext/xymon-smart.sh
install -D -m755 ${srcdir}/log_list.sh ${pkgdir}/home/xymon/client/bin/log_list.sh
install -m755 analysis.cfg ${pkgdir}/home/xymon/etc/analysis.cfg
cat alerts.cfg >> ${pkgdir}/home/xymon/etc/alerts.cfg
install -m755 hobbit_notify.sh ${pkgdir}/home/xymon/server/bin/hobbit_notify.sh
install -m755 login_notify.sh ${pkgdir}/home/xymon/server/bin/login_notify.sh
install -m755 ${srcdir}/tv.png ${pkgdir}/data/srv/httpd/htdocs/xymon/gifs/tv.png
install -m755 ${srcdir}/tuner.png ${pkgdir}/data/srv/httpd/htdocs/xymon/gifs/tuner.png
install -m755 ${srcdir}/be.png ${pkgdir}/data/srv/httpd/htdocs/xymon/gifs/be.png
install -D -m644 ${srcdir}/logrotate-server.xymon ${pkgdir}/etc/logrotate.d/xymon-server
# fix env for mythtb bindingds
echo "MYTHCONFDIR=/usr/share/mythtv" >> ${pkgdir}/home/xymon/etc/xymonserver.cfg
#copy in replacment icon set
DOCDIR=${pkgdir}/data/srv/httpd/htdocs/xymon
cp -rp ${DOCDIR}/gifs ${DOCDIR}/gifs.orig
cd ${srcdir}/themes
cp -fp Common/* ${DOCDIR}/gifs/
cp -fp ModernLED/* ${DOCDIR}/gifs/
#apply patches to conf file
install -D -m775 ${srcdir}/tasks.d.mv ${pkgdir}/home/xymon/etc/tasks.d/mv.cfg
cd ${pkgdir}/home/xymon/etc
patch -p0 < ${srcdir}/graph.cfg.diff || return 1
patch -p0 < ${srcdir}/xymonserver.cfg.diff || return 1
patch -p3 < ${srcdir}/client-local.cfg.patch || return 1
patch -p3 < ${srcdir}/hosts.cfg.patch || return 1
#make dir for login alerts
mkdir ${pkgdir}/home/xymon/var/login_alerts
#add custom module descriptions
COLDOC=$pkgdir/home/xymon/etc/columndoc.csv
echo "myth_mtc;The <b>myth_mtc</b> column shows the status of the MythTV maintenance script.;" >> $COLDOC
echo "orphan;The <b>orphan</b> column shows the status of the find_orphans.py script.;" >> $COLDOC
#fix permissions
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/xymon/
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/xymon/notes/
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/xymon/gifs/
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/xymon/snap/
chmod 775 ${pkgdir}/data/srv/httpd/htdocs/xymon/rep/
chmod 750 ${pkgdir}/etc/sudoers.d
chmod 775 ${pkgdir}/home/xymon/var/login_alerts
}
package_xymonclient(){
#create client package as well
depends=('smartmontools')
backup=('data/srv/xymon/client/etc/xymonclient.cfg')
install=xymon-client.install
install -D -m400 ${srcdir}/xymon-client.rules ${pkgdir}/etc/sudoers.d/xymon_client
install -D -m755 ${srcdir}/log_list.sh ${pkgdir}/home/xymon/client/bin/log_list.sh
install -D -m644 ${srcdir}/logrotate-client.xymon ${pkgdir}/etc/logrotate.d/xymon-client
install -D -m755 ${srcdir}/hobbit-mem-myth.sh ${pkgdir}/home/xymon/client/ext/hobbit-mem-myth.sh
install -D -m755 ${srcdir}/xymon-gputemp.sh ${pkgdir}/home/xymon/client/ext/xymon-gputemp.sh
install -D -m755 ${srcdir}/xymon-smart.sh ${pkgdir}/home/xymon/client/ext/xymon-smart.sh
cp -rp ${pkgdir}/../xymonserver/home/xymon/client/ ${pkgdir}/home/xymon/
cd -
cd ${pkgdir}/home/xymon/client/etc
patch -p0 < ${srcdir}/clientlaunch.cfg.patch
cd -
}
md5sums=('d8d119a777e7b7204d1292fb27314312'
'a0fbb9cbeb3600a40943e6205790f22f'
'c60b0d59bb39505ee3d62c6dd65429c5'
'53f1af1054d3c70f4d6b6fe952cf7e11'
'510f36dfada9439f09327da5278bcdb1'
'c9f93372dce3489e23fb601a941818bb'
'8d024dfc58bacdfedfbddf8e78fd53eb'
'b2f98ac0df013332deedc1efae0a270d'
'4a8244c1bb44fe35ca7372355b01cec4'
'aa7c2eec6cd894dc171e90a4eed69de1'
'166279c006c3ef7bf0c21537cf89fc83'
'80d9cfac86c6d96836e6f406e35e7cf5'
'd210c43fb9ee9ad6cd7648e0c2e0efea'
'0c808fa12672289f86b0651545381308'
'0469d775db9fdd18ea95dd41937ada82'
'0757294eec13771f8e63da23cf066796'
'270e13da6cbc9d49079d994edaa71e64'
'22d4c9065fd959efe82f121dcb511305'
'9af2ad60ac4c3cb653754618f603e311'
'a9b7f0a22f29f55b2928160bc44f2c14'
'6452d891d88bb46d07bcf7790a523ad0'
'1348bef3cdd20ec0ea66d61ac1834847'
'b4e8641e97e6b689dbc634af785e6799'
'e2844513e2c92e8b5084818f3b2a478d'
'98e9242ae346f729b14cb195786571f2'
'31ac5c1f6dcc9408b64c4107b325a9a6'
'c7178bbf384bbe86c318b60fef6faf10'
'2871c53627e9e125922118013a868a95'
'cdfbca43dbae4ce0ca72dd002ec22af1'
'606f535a49f32b35802ed9d46bd7d068')
|