]> git.pld-linux.org Git - packages/zabbix.git/blob - zabbix.spec
- php frontend has to require php*sql
[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 %{!?with_pgsql:Requires:        php-mysql}
62 %{?with_pgsql:Requires: php-pgsql}
63
64 %description frontend-php
65 This package provides web based (PHP) frontend for zabbix.
66
67 %description frontend-php -l pl
68 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
69
70 %package agent-inetd
71 Summary:        inetd agent for zabbix
72 Summary(pl):    Wersja inetd agenta zabbiksa
73 Group:          Networking/Admin
74 Requires:       %{name} = %{version}
75 Requires:       inetdaemon
76 Obsoletes:      %{name}-agent-standalone
77
78 %description agent-inetd
79 This package provides inetd version of zabbix agent.
80
81 %description agent-inetd -l pl
82 Ten pakiet dostarcza agenta zabbiksa dla inetd.
83
84 %package agent-standalone
85 Summary:        Standalone agent for zabbix
86 Summary(pl):    Wersja wolnostoj±ca agenta zabbiksa
87 Group:          Networking/Admin
88 Requires:       %{name} = %{version}
89 Obsoletes:      %{name}-agent-inetd
90
91 %description agent-standalone
92 This package provides standalone version of zabbix agent.
93
94 %description agent-standalone -l pl
95 Ten pakiet dostarcza wolnostoj±cej wersji agenta zabbiksa.
96
97 %package suckerd
98 Summary:        sucker daemon for zabbix
99 Summary(pl):    Demon sucker dla zabbiksa
100 Group:          Networking/Admin
101 Requires:       %{name} = %{version}
102 %{!?with_pgsql:Requires:        mysql}
103 %{?with_pgsql:Requires: postgresql}
104
105 %description suckerd
106 This package provides the sucker daemon for zabbix.
107
108 %description suckerd -l pl
109 Ten pakiet zawiera demona sucker dla zabbiksa.
110
111 %package trapper-inetd
112 Summary:        inetd trapper for zabbix
113 Summary(pl):    Wersja inetd programu pu³apkuj±cego zabbiksa
114 Group:          Networking/Admin
115 Requires:       %{name} = %{version}
116 Requires:       inetdaemon
117 Obsoletes:      %{name}-trapper-standalone
118
119 %description trapper-inetd
120 This package provides inetd version of zabbix trapper.
121
122 %description trapper-inetd -l pl
123 Ten pakiet zawiera program pu³apkuj±cy zabbiksa dla inetd.
124
125 %package trapper-standalone
126 Summary:        Standalone trapper for zabbix
127 Summary(pl):    Wersja wolnostoj±ca programu pu³apkuj±cego zabbiksa
128 Group:          Networking/Admin
129 Requires:       %{name} = %{version}
130 Obsoletes:      %{name}-trapper-inetd
131
132 %description trapper-standalone
133 This package provides standalone version of zabbix trapper.
134
135 %description trapper-standalone -l pl
136 Ten pakiet zawiera wolnostoj±c± wersjê programu pu³apkuj±cego
137 zabbiksa.
138
139 %package sender
140 Summary:        zabbix's sender
141 Summary(pl):    Program zawiadamiaj±cy zabbiksa
142 Group:          Networking/Admin
143
144 %description sender
145 This package provides the zabbix sender.
146
147 %description sender -l pl
148 Ten pakiet zawiera program zawiadamiaj±cy zabbiksa.
149
150 %prep
151 %setup -q -n %{name}-%{version}%{_beta}
152
153 %build
154 %configure \
155         %{!?with_pgsql:--with-mysql} \
156         %{?with_pgsql:--with-pgsql} \
157         --with-net-snmp
158
159 %{__make}
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}}
164
165 install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
166 install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
167 cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir}
168
169 install %SOURCE1 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
170 install %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %pre
176 if [ -z "`/usr/bin/getgid zabbix`" ]; then
177         /usr/sbin/groupadd zabbix
178 fi
179 if [ -z "`/bin/id -u zabbix 2>/dev/null`" ]; then
180         /usr/sbin/useradd -d / -g zabbix -c "Zabbix User" -s /bin/false zabbix
181 fi
182
183 %postun
184 if [ "$1" = "0" ]; then
185         /usr/sbin/userdel zabbix
186         /usr/sbin/groupdel zabbix
187 fi
188
189 %post agent-inetd
190 if [ -f /var/lock/subsys/rc-inetd ]; then
191         /etc/rc.d/init.d/rc-inetd reload
192 else
193         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
194 fi
195
196 %postun agent-inetd
197 if [ -f /var/lock/subsys/rc-inetd ]; then
198         /etc/rc.d/init.d/rc-inetd reload
199 fi
200
201 %post trapper-inetd
202 if [ -f /var/lock/subsys/rc-inetd ]; then
203         /etc/rc.d/init.d/rc-inetd reload
204 else
205         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
206 fi
207
208 %postun trapper-inetd
209 if [ -f /var/lock/subsys/rc-inetd ]; then
210         /etc/rc.d/init.d/rc-inetd reload
211 fi
212
213 %files
214 %defattr(644,root,root,755)
215 %doc doc/Zabbix\ Manual.pdf AUTHORS ChangeLog FAQ TODO create bin/ZabbixW32.exe
216 %attr(750,root,zabbix) %dir %{_sysconfdir}
217
218 %files frontend-php
219 %defattr(644,root,root,755)
220 %{htmldir}
221
222 %files agent-inetd
223 %defattr(644,root,root,755)
224 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
225 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-agent
226 %attr(755,root,root) %{_sbindir}/zabbix_agent
227
228 %files agent-standalone
229 %defattr(644,root,root,755)
230 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
231 %attr(755,root,root) %{_sbindir}/zabbix_agentd
232
233 %files suckerd
234 %defattr(644,root,root,755)
235 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_suckerd.conf
236 %attr(755,root,root) %{_sbindir}/zabbix_suckerd
237
238 %files trapper-inetd
239 %defattr(644,root,root,755)
240 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf
241 %attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-trapper
242 %attr(755,root,root) %{_sbindir}/zabbix_trapper
243
244 %files trapper-standalone
245 %defattr(644,root,root,755)
246 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapperd.conf
247 %attr(755,root,root) %{_sbindir}/zabbix_trapperd
248
249 %files sender
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_sbindir}/zabbix_sender
This page took 0.039518 seconds and 4 git commands to generate.