]> git.pld-linux.org Git - packages/zabbix.git/blob - zabbix.spec
0bcaecd04b11ad6977866ea32cee270487ee856f
[packages/zabbix.git] / zabbix.spec
1 #
2 # Conditional build:
3 %bcond_with pgsql       # enable postgresql support (by default use mysql)
4 #
5 %define _beta   beta14
6 Summary:        zabbix - network monitoring software
7 Summary(pl):    zabbix - oprogramowanie do monitorowania sieci
8 Name:           zabbix
9 Version:        1.0
10 Release:        0.%{_beta}.2
11 License:        GPL v2+
12 Group:          Networking/Admin
13 Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}%{_beta}.tar.gz
14 # Source0-md5:  0ac320c6cd99f801d8cb7923ca790419
15 Source1:        %{name}-agent.inetd
16 Source2:        %{name}-trapper.inetd
17 URL:            http://zabbix.sourceforge.net/
18 %{!?with_pgsql:BuildRequires:   mysql-devel}
19 %{?with_pgsql:BuildRequires:    postgresql-devel}
20 BuildRequires:  net-snmp-devel
21 BuildRequires:  openssl-devel >= 0.9.7c
22 Requires(pre):  /usr/bin/getgid
23 Requires(pre):  /bin/id
24 Requires(pre):  /usr/sbin/groupadd
25 Requires(pre):  /usr/sbin/useradd
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _sysconfdir     /etc/%{name}
31 %define         htmldir         /home/services/html/zabbix
32
33 %description
34 zabbix is software that monitors numerous parameters of a network and
35 the servers on that network. zabbix is a useful tool for monitoring
36 the health and integrity of servers. zabbix uses a flexible
37 notification mechanism that allows users to configure email based
38 alerts for virtually any event. All monitored parameters are stored in
39 a database. zabbix offers excellent reporting and data visualisation
40 features based on the stored data. zabbix supports both polling and
41 trapping. All zabbix reports and statistics, as well as configuration
42 parameters, are accessed through a web-based front end.
43
44 %description -l pl
45 zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
46 serwerów sieciowych. zabbix jest przydatny przy monitorowaniu
47 dzia³ania serwerów. zabbix korzysta z elastycznego mechanizmu
48 powiadamiania, który pozwala u¿ytkownikom konfigurowaæ powiadamianie
49 poczt± elektroniczn± dla praktycznie wszelkich zdarzeñ. Monitorowane
50 parametry s± przechowywane w bazie danych. zabbix oferuje, w oparciu o
51 przechowywane dane, ¶wietne raportowanie i funkcje wizualizacji.
52 zabbix wspiera zarówno odpytywanie, jak i pu³apkowanie. Dostêp do
53 wszystkich raportów i statystyk zabbiksa jest mo¿liwy poprzez
54 interfejs oparty o WWW.
55
56 %package frontend-php
57 Summary:        PHP frontend for zabbix
58 Summary(pl):    Interfejs PHP dla zabbiksa
59 Group:          Networking/Admin
60 Requires:       apache
61 Requires:       php
62 %{!?with_pgsql:Requires:        php-mysql}
63 %{?with_pgsql:Requires: php-pgsql}
64
65 %description frontend-php
66 This package provides web based (PHP) frontend for zabbix.
67
68 %description frontend-php -l pl
69 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
70
71 %package agent-inetd
72 Summary:        inetd agent for zabbix
73 Summary(pl):    Wersja inetd agenta zabbiksa
74 Group:          Networking/Admin
75 Requires:       %{name} = %{version}
76 Requires:       inetdaemon
77 Obsoletes:      %{name}-agent-standalone
78
79 %description agent-inetd
80 This package provides inetd version of zabbix agent.
81
82 %description agent-inetd -l pl
83 Ten pakiet dostarcza agenta zabbiksa dla inetd.
84
85 %package agent-standalone
86 Summary:        Standalone agent for zabbix
87 Summary(pl):    Wersja wolnostoj±ca agenta zabbiksa
88 Group:          Networking/Admin
89 Requires:       %{name} = %{version}
90 Obsoletes:      %{name}-agent-inetd
91
92 %description agent-standalone
93 This package provides standalone version of zabbix agent.
94
95 %description agent-standalone -l pl
96 Ten pakiet dostarcza wolnostoj±cej wersji agenta zabbiksa.
97
98 %package suckerd
99 Summary:        sucker daemon for zabbix
100 Summary(pl):    Demon sucker dla zabbiksa
101 Group:          Networking/Admin
102 Requires:       %{name} = %{version}
103 %{!?with_pgsql:Requires:        mysql}
104 %{?with_pgsql:Requires: postgresql}
105
106 %description suckerd
107 This package provides the sucker daemon for zabbix.
108
109 %description suckerd -l pl
110 Ten pakiet zawiera demona sucker dla zabbiksa.
111
112 %package trapper-inetd
113 Summary:        inetd trapper for zabbix
114 Summary(pl):    Wersja inetd programu pu³apkuj±cego zabbiksa
115 Group:          Networking/Admin
116 Requires:       %{name} = %{version}
117 Requires:       inetdaemon
118 Obsoletes:      %{name}-trapper-standalone
119
120 %description trapper-inetd
121 This package provides inetd version of zabbix trapper.
122
123 %description trapper-inetd -l pl
124 Ten pakiet zawiera program pu³apkuj±cy zabbiksa dla inetd.
125
126 %package trapper-standalone
127 Summary:        Standalone trapper for zabbix
128 Summary(pl):    Wersja wolnostoj±ca programu pu³apkuj±cego zabbiksa
129 Group:          Networking/Admin
130 Requires:       %{name} = %{version}
131 Obsoletes:      %{name}-trapper-inetd
132
133 %description trapper-standalone
134 This package provides standalone version of zabbix trapper.
135
136 %description trapper-standalone -l pl
137 Ten pakiet zawiera wolnostoj±c± wersjê programu pu³apkuj±cego
138 zabbiksa.
139
140 %package sender
141 Summary:        zabbix's sender
142 Summary(pl):    Program zawiadamiaj±cy zabbiksa
143 Group:          Networking/Admin
144
145 %description sender
146 This package provides the zabbix sender.
147
148 %description sender -l pl
149 Ten pakiet zawiera program zawiadamiaj±cy zabbiksa.
150
151 %prep
152 %setup -q -n %{name}-%{version}%{_beta}
153
154 %build
155 %configure \
156         %{!?with_pgsql:--with-mysql} \
157         %{?with_pgsql:--with-pgsql} \
158         --with-net-snmp
159
160 %{__make}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}}
165
166 install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
167 install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
168 cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir}
169
170 install %SOURCE1 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
171 install %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
172
173 %clean
174 rm -rf $RPM_BUILD_ROOT
175
176 %pre
177 if [ -z "`/usr/bin/getgid zabbix`" ]; then
178         /usr/sbin/groupadd zabbix
179 fi
180 if [ -z "`/bin/id -u zabbix 2>/dev/null`" ]; then
181         /usr/sbin/useradd -d / -g zabbix -c "Zabbix User" -s /bin/false zabbix
182 fi
183
184 %postun
185 if [ "$1" = "0" ]; then
186         /usr/sbin/userdel zabbix
187         /usr/sbin/groupdel zabbix
188 fi
189
190 %post agent-inetd
191 if [ -f /var/lock/subsys/rc-inetd ]; then
192         /etc/rc.d/init.d/rc-inetd reload
193 else
194         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
195 fi
196
197 %postun agent-inetd
198 if [ -f /var/lock/subsys/rc-inetd ]; then
199         /etc/rc.d/init.d/rc-inetd reload
200 fi
201
202 %post trapper-inetd
203 if [ -f /var/lock/subsys/rc-inetd ]; then
204         /etc/rc.d/init.d/rc-inetd reload
205 else
206         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
207 fi
208
209 %postun trapper-inetd
210 if [ -f /var/lock/subsys/rc-inetd ]; then
211         /etc/rc.d/init.d/rc-inetd reload
212 fi
213
214 %files
215 %defattr(644,root,root,755)
216 %doc doc/Zabbix\ Manual.pdf AUTHORS ChangeLog FAQ TODO create bin/ZabbixW32.exe
217 %attr(750,root,zabbix) %dir %{_sysconfdir}
218
219 %files frontend-php
220 %defattr(644,root,root,755)
221 %{htmldir}
222
223 %files agent-inetd
224 %defattr(644,root,root,755)
225 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
226 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-agent
227 %attr(755,root,root) %{_sbindir}/zabbix_agent
228
229 %files agent-standalone
230 %defattr(644,root,root,755)
231 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
232 %attr(755,root,root) %{_sbindir}/zabbix_agentd
233
234 %files suckerd
235 %defattr(644,root,root,755)
236 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_suckerd.conf
237 %attr(755,root,root) %{_sbindir}/zabbix_suckerd
238
239 %files trapper-inetd
240 %defattr(644,root,root,755)
241 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf
242 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-trapper
243 %attr(755,root,root) %{_sbindir}/zabbix_trapper
244
245 %files trapper-standalone
246 %defattr(644,root,root,755)
247 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapperd.conf
248 %attr(755,root,root) %{_sbindir}/zabbix_trapperd
249
250 %files sender
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_sbindir}/zabbix_sender
This page took 0.075835 seconds and 2 git commands to generate.