]> git.pld-linux.org Git - packages/zabbix.git/blob - zabbix.spec
- 1.8.10
[packages/zabbix.git] / zabbix.spec
1 # TODO
2 # - initscript for zabbix-agent-standalone and zabbix-server
3 #
4 # Conditional build:
5 %bcond_with     pgsql   # enable PostgreSQL support (by default use mysql)
6 %bcond_with     oracle  # enable Oracle support (by default use mysql)
7
8 Summary:        zabbix - network monitoring software
9 Summary(pl.UTF-8):      zabbix - oprogramowanie do monitorowania sieci
10 Name:           zabbix
11 Version:        1.8.10
12 Release:        0.1
13 License:        GPL v2+
14 Group:          Networking/Utilities
15 Source0:        http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
16 # Source0-md5:  7e89f80c1822787c0831f7c0dbefcd7b
17 Source1:        %{name}-agent.inetd
18 Source2:        %{name}-apache.conf
19 URL:            http://zabbix.sourceforge.net/
20 %{!?with_pgsql:BuildRequires:   mysql-devel}
21 BuildRequires:  curl-devel
22 BuildRequires:  iksemel-devel
23 BuildRequires:  net-snmp-devel
24 BuildRequires:  openldap-devel >= 2.4.6
25 BuildRequires:  openssl-devel >= 0.9.7d
26 %{?with_pgsql:BuildRequires:    postgresql-devel}
27 BuildRequires:  rpmbuild(macros) >= 1.268
28 Requires(postun):       /usr/sbin/groupdel
29 Requires(postun):       /usr/sbin/userdel
30 Requires(pre):  /bin/id
31 Requires(pre):  /usr/bin/getgid
32 Requires(pre):  /usr/sbin/groupadd
33 Requires(pre):  /usr/sbin/useradd
34 Provides:       group(zabbix)
35 Provides:       user(zabbix)
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _sysconfdir     /etc/%{name}
39 %define         _appdir         %{_datadir}/%{name}
40 %define         _webapps        /etc/webapps
41 %define         _webapp         %{name}
42
43 # FIXME
44 %define filterout_ld -Wl,--as-needed
45
46 %description
47 zabbix is software that monitors numerous parameters of a network and
48 the servers on that network. It is a useful tool for monitoring
49 the health and integrity of servers. zabbix uses a flexible
50 notification mechanism that allows users to configure email based
51 alerts for virtually any event. All monitored parameters are stored in
52 a database. zabbix offers excellent reporting and data visualisation
53 features based on the stored data. zabbix supports both polling and
54 trapping. All zabbix reports and statistics, as well as configuration
55 parameters, are accessed through a web-based front end.
56
57 %description -l pl.UTF-8
58 zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
59 serwerów sieciowych. Jest przydatny przy monitorowaniu działania
60 serwerów. Jorzysta z elastycznego mechanizmu powiadamiania, który
61 pozwala użytkownikom konfigurować powiadamianie pocztą elektroniczną
62 dla praktycznie wszelkich zdarzeń. Monitorowane parametry są
63 przechowywane w bazie danych. W oparciu o przechowywane dane zabbix
64 oferuje świetne raportowanie i funkcje wizualizacji. Wspiera zarówno
65 odpytywanie jak i pułapkowanie. Dostęp do wszystkich raportów i
66 statystyk zabbiksa jest możliwy poprzez interfejs oparty o WWW.
67
68 %package agent-inetd
69 Summary:        inetd agent for zabbix
70 Summary(pl.UTF-8):      Wersja inetd agenta zabbiksa
71 Group:          Networking/Utilities
72 Requires:       %{name} = %{version}-%{release}
73 Requires:       inetdaemon
74 Obsoletes:      zabbix-agent-standalone
75
76 %description agent-inetd
77 This package provides inetd version of zabbix agent.
78
79 %description agent-inetd -l pl.UTF-8
80 Ten pakiet dostarcza agenta zabbiksa dla inetd.
81
82 %package agent-standalone
83 Summary:        Standalone agent for zabbix
84 Summary(pl.UTF-8):      Wersja wolnostojąca agenta zabbiksa
85 Group:          Networking/Utilities
86 Requires:       %{name} = %{version}-%{release}
87 Obsoletes:      zabbix-agent-inetd
88
89 %description agent-standalone
90 This package provides standalone (recommended) version of zabbix agent.
91
92 %description agent-standalone -l pl.UTF-8
93 Ten pakiet dostarcza wolnostojącej (zalecanej) wersji agenta zabbiksa.
94
95 %package frontend-php
96 Summary:        PHP frontend for zabbix
97 Summary(pl.UTF-8):      Interfejs PHP dla zabbiksa
98 Group:          Applications/WWW
99 Requires:       php(gd)
100 Requires:       php-bcmath
101 Requires:       php-ctype
102 Requires:       php-mbstring
103 Requires:       php-pcre
104 Requires:       php-sockets
105 Requires:       php-session
106 %{!?with_pgsql:Requires:        php-mysql}
107 %{?with_pgsql:Requires: php-pgsql}
108 Requires:       webapps
109 Requires:       webserver = apache
110 Requires:       webserver(php)
111
112 %description frontend-php
113 This package provides web based (PHP) frontend for zabbix.
114
115 %description frontend-php -l pl.UTF-8
116 Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
117
118 %package get
119 Summary:        Program retrieving data from zabbix agent
120 Summary(pl.UTF-8):      Program odpytujÄcy agenta zabbiksa
121 Group:          Networking/Utilities
122
123 %description get
124 This package provides a program retrieving data from zabbix agent.
125
126 %description get -l pl.UTF-8
127 Ten pakiet zawiera program odpytujÄcy agenta zabbiksa.
128
129 %package proxy
130 Summary:        Zabbix proxy
131 Summary(pl.UTF-8):      Proxy do zabbiksa
132 Group:          Networking/Utilities
133
134 %description proxy
135 This package provides the zabbix proxy.
136
137 %description proxy -l pl.UTF-8
138 Ten pakiet zawiera proxy zabbix.
139
140 %package sender
141 Summary:        Zabbix sender
142 Summary(pl.UTF-8):      Program zawiadamiający zabbiksa
143 Group:          Networking/Utilities
144
145 %description sender
146 This package provides the zabbix sender.
147
148 %description sender -l pl.UTF-8
149 Ten pakiet zawiera program zawiadamiający zabbiksa.
150
151 %package server
152 Summary:        Zabbix server
153 Summary(pl.UTF-8):      Serwer zabbiksa
154 Group:          Networking/Utilities
155 Requires:       %{name} = %{version}-%{release}
156 Obsoletes:      %{name}-suckerd
157 Obsoletes:      %{name}-trapper-inetd
158 Obsoletes:      %{name}-trapper-standalone
159
160 %description server
161 This package provides the zabbix server.
162
163 %description server -l pl.UTF-8
164 Ten pakiet zawiera serwer zabbiksa.
165
166 %prep
167 %setup -q
168
169 %build
170 %configure \
171         %{!?with_pgsql:--with-mysql} \
172         %{?with_pgsql:--with-pgsql} \
173         %{?with_oracle:--with-oracle} \
174         --enable-server \
175         --enable-agent \
176         --enable-proxy \
177         --with-net-snmp \
178         --with-ldap \
179         --with-jabber \
180         --with-libcurl
181 #       --with-ucd-snmp=DIR \
182
183 %{__make}
184
185 %install
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig/rc-inetd,webapps/%{_webapp}},%{_appdir}}
188
189 %{__make} install \
190         DESTDIR=$RPM_BUILD_ROOT
191
192 install misc/conf/zabbix_{a*,s*}.conf $RPM_BUILD_ROOT%{_sysconfdir}
193 cp -r frontends $RPM_BUILD_ROOT%{_appdir}
194 #mv -f $RPM_BUILD_ROOT%{_appdir}/frontends/php/include/db.inc.php $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
195 #ln -s %{_webapps}/%{_webapp}/db.inc.php $RPM_BUILD_ROOT%{_appdir}/frontends/php/include
196 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
197 install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
198 install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
199
200 %clean
201 rm -rf $RPM_BUILD_ROOT
202
203 %triggerin frontend-php -- apache1 < 1.3.37-3, apache1-base
204 %webapp_register apache %{_webapp}
205
206 %triggerun frontend-php -- apache1 < 1.3.37-3, apache1-base
207 %webapp_unregister apache %{_webapp}
208
209 %triggerin frontend-php -- apache < 2.2.0, apache-base
210 %webapp_register httpd %{_webapp}
211
212 %triggerun frontend-php -- apache < 2.2.0, apache-base
213 %webapp_unregister httpd %{_webapp}
214
215 %pre
216 %groupadd -g 111 zabbix
217 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
218
219 %post server
220 if [ "$1" = 1 ]; then
221         %banner -e %{name} <<-EOF
222         You should create database for Zabbix.
223         Running these should be fine in most cases:
224 %if %{with pgsql}
225         psql -c 'create database zabbix'
226         zcat %{_docdir}/%{name}-%{version}/create/postgresql/schema.sql.gz | psql zabbix
227         zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix
228         zcat %{_docdir}/%{name}-%{version}/create/data/images_pgsql.sql.gz | psql zabbix
229 %else
230         mysqladmin create zabbix
231         zcat %{_docdir}/%{name}-%{version}/create/mysql/schema.sql.gz | mysql zabbix
232         zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | mysql zabbix
233         zcat %{_docdir}/%{name}-%{version}/create/data/images.sql.gz | mysql zabbix
234 %endif
235         %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.}
236 EOF
237 fi
238
239 %postun
240 if [ "$1" = "0" ]; then
241         %userremove zabbix
242         %groupremove zabbix
243 fi
244
245 %post agent-inetd
246 %service -q rc-inetd reload
247
248 %postun agent-inetd
249 if [ "$1" = 0 ]; then
250         %service -q rc-inetd reload
251 fi
252
253 %files
254 %defattr(644,root,root,755)
255 %doc AUTHORS NEWS README ChangeLog
256 %attr(750,root,zabbix) %dir %{_sysconfdir}
257 %dir %{_appdir}
258 %dir %{_appdir}/frontends
259
260 %files agent-inetd
261 %defattr(644,root,root,755)
262 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
263 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/zabbix-agent
264 %attr(755,root,root) %{_sbindir}/zabbix_agent
265
266 %files agent-standalone
267 %defattr(644,root,root,755)
268 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
269 %attr(755,root,root) %{_sbindir}/zabbix_agentd
270 %{_mandir}/man8/zabbix_agentd*
271
272 %files frontend-php
273 %defattr(644,root,root,755)
274 %attr(750,root,http) %dir %{_webapps}/%{_webapp}
275 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/*
276 %{_appdir}/frontends/php
277
278 %files get
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_bindir}/zabbix_get
281 %{_mandir}/man1/zabbix_get*
282
283 %files proxy
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_sbindir}/zabbix_proxy
286 %{_mandir}/man8/zabbix_proxy*
287
288 %files sender
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/zabbix_sender
291 %{_mandir}/man1/zabbix_sender*
292
293 %files server
294 %defattr(644,root,root,755)
295 %doc create upgrades
296 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
297 %attr(755,root,root) %{_sbindir}/zabbix_server
298 %{_mandir}/man8/zabbix_server*
This page took 0.1178 seconds and 4 git commands to generate.