]> git.pld-linux.org Git - packages/zabbix.git/blob - zabbix.spec
- use %useradd/%groupadd macros
[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.7d
22 BuildRequires:  rpmbuild(macros) >= 1.202
23 Requires(pre):  /bin/id
24 Requires(pre):  /usr/bin/getgid
25 Requires(pre):  /usr/sbin/groupadd
26 Requires(pre):  /usr/sbin/useradd
27 Requires(postun):       /usr/sbin/groupdel
28 Requires(postun):       /usr/sbin/userdel
29 Provides:       group(zabbix)
30 Provides:       user(zabbix)
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _sysconfdir     /etc/%{name}
34 %define         htmldir         /home/services/html/zabbix
35
36 %description
37 zabbix is software that monitors numerous parameters of a network and
38 the servers on that network. zabbix is a useful tool for monitoring
39 the health and integrity of servers. zabbix uses a flexible
40 notification mechanism that allows users to configure email based
41 alerts for virtually any event. All monitored parameters are stored in
42 a database. zabbix offers excellent reporting and data visualisation
43 features based on the stored data. zabbix supports both polling and
44 trapping. All zabbix reports and statistics, as well as configuration
45 parameters, are accessed through a web-based front end.
46
47 %description -l pl
48 zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
49 serwerów sieciowych. zabbix jest przydatny przy monitorowaniu
50 dzia³ania serwerów. zabbix korzysta z elastycznego mechanizmu
51 powiadamiania, który pozwala u¿ytkownikom konfigurowaæ powiadamianie
52 poczt± elektroniczn± dla praktycznie wszelkich zdarzeñ. Monitorowane
53 parametry s± przechowywane w bazie danych. zabbix oferuje, w oparciu o
54 przechowywane dane, ¶wietne raportowanie i funkcje wizualizacji.
55 zabbix wspiera zarówno odpytywanie, jak i pu³apkowanie. Dostêp do
56 wszystkich raportów i statystyk zabbiksa jest mo¿liwy poprzez
57 interfejs oparty o WWW.
58
59 %package frontend-php
60 Summary:        PHP frontend for zabbix
61 Summary(pl):    Interfejs PHP dla zabbiksa
62 Group:          Networking/Admin
63 Requires:       apache
64 Requires:       php
65 %{!?with_pgsql:Requires:        php-mysql}
66 %{?with_pgsql:Requires: php-pgsql}
67
68 %description frontend-php
69 This package provides web based (PHP) frontend for zabbix.
70
71 %description frontend-php -l pl
72 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
73
74 %package agent-inetd
75 Summary:        inetd agent for zabbix
76 Summary(pl):    Wersja inetd agenta zabbiksa
77 Group:          Networking/Admin
78 Requires:       %{name} = %{version}
79 Requires:       inetdaemon
80 Obsoletes:      %{name}-agent-standalone
81
82 %description agent-inetd
83 This package provides inetd version of zabbix agent.
84
85 %description agent-inetd -l pl
86 Ten pakiet dostarcza agenta zabbiksa dla inetd.
87
88 %package agent-standalone
89 Summary:        Standalone agent for zabbix
90 Summary(pl):    Wersja wolnostoj±ca agenta zabbiksa
91 Group:          Networking/Admin
92 Requires:       %{name} = %{version}
93 Obsoletes:      %{name}-agent-inetd
94
95 %description agent-standalone
96 This package provides standalone version of zabbix agent.
97
98 %description agent-standalone -l pl
99 Ten pakiet dostarcza wolnostoj±cej wersji agenta zabbiksa.
100
101 %package suckerd
102 Summary:        sucker daemon for zabbix
103 Summary(pl):    Demon sucker dla zabbiksa
104 Group:          Networking/Admin
105 Requires:       %{name} = %{version}
106 %{!?with_pgsql:Requires:        mysql}
107 %{?with_pgsql:Requires: postgresql}
108
109 %description suckerd
110 This package provides the sucker daemon for zabbix.
111
112 %description suckerd -l pl
113 Ten pakiet zawiera demona sucker dla zabbiksa.
114
115 %package trapper-inetd
116 Summary:        inetd trapper for zabbix
117 Summary(pl):    Wersja inetd programu pu³apkuj±cego zabbiksa
118 Group:          Networking/Admin
119 Requires:       %{name} = %{version}
120 Requires:       inetdaemon
121 Obsoletes:      %{name}-trapper-standalone
122
123 %description trapper-inetd
124 This package provides inetd version of zabbix trapper.
125
126 %description trapper-inetd -l pl
127 Ten pakiet zawiera program pu³apkuj±cy zabbiksa dla inetd.
128
129 %package trapper-standalone
130 Summary:        Standalone trapper for zabbix
131 Summary(pl):    Wersja wolnostoj±ca programu pu³apkuj±cego zabbiksa
132 Group:          Networking/Admin
133 Requires:       %{name} = %{version}
134 Obsoletes:      %{name}-trapper-inetd
135
136 %description trapper-standalone
137 This package provides standalone version of zabbix trapper.
138
139 %description trapper-standalone -l pl
140 Ten pakiet zawiera wolnostoj±c± wersjê programu pu³apkuj±cego
141 zabbiksa.
142
143 %package sender
144 Summary:        zabbix's sender
145 Summary(pl):    Program zawiadamiaj±cy zabbiksa
146 Group:          Networking/Admin
147
148 %description sender
149 This package provides the zabbix sender.
150
151 %description sender -l pl
152 Ten pakiet zawiera program zawiadamiaj±cy zabbiksa.
153
154 %prep
155 %setup -q -n %{name}-%{version}%{_beta}
156
157 %build
158 %configure \
159         %{!?with_pgsql:--with-mysql} \
160         %{?with_pgsql:--with-pgsql} \
161         --with-net-snmp
162
163 %{__make}
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},%{htmldir}}
168
169 install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
170 install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
171 cp -r frontends/php/* $RPM_BUILD_ROOT%{htmldir}
172
173 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
174 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %pre
180 %groupadd -g 111 zabbix
181 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
182
183 %postun
184 if [ "$1" = "0" ]; then
185         %userremove zabbix
186         %groupremove 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.114653 seconds and 4 git commands to generate.