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