]> TLD Linux GIT Repositories - packages/zabbix.git/blob - zabbix.spec
- don't build Zabbix Agent 2 by default, it requires systemd to run
[packages/zabbix.git] / zabbix.spec
1 # TODO:
2 # - initscript for zabbix-server, zabbix-proxy and zabbix-java
3 #
4 # Conditional build:
5 %bcond_with     agent2  # build Zabbix Agent 2
6 %bcond_without  pgsql   # enable PostgreSQL support
7 %bcond_without  sqlite3 # enable sqlite3 support
8 %bcond_without  mysql   # enable MySQL support
9 %bcond_without  java    # disable java support
10
11 %define databases %{?with_sqlite3:sqlite3} %{?with_pgsql:postgresql} %{?with_mysql:mysql}
12 %define any_database %{with pgsql}%{with mysql}%{with sqlite3}
13
14 %define         _noautoreq 'pear(.*\.php)'
15
16 %define         php_min_version 5.4.0
17 Summary:        Zabbix - network monitoring software
18 Summary(pl.UTF-8):      Zabbix - oprogramowanie do monitorowania sieci
19 Name:           zabbix
20 Version:        6.0.19
21 Release:        1
22 License:        GPL v2+
23 Group:          Networking/Utilities
24 Source0:        https://cdn.zabbix.com/zabbix/sources/stable/6.0/%{name}-%{version}.tar.gz
25 # Source0-md5:  a57192d6bb17f9ca80a75f87d5462987
26 Source1:        %{name}-apache.conf
27 Source2:        %{name}_agentd.init
28 Source3:        %{name}_server.init
29 Source4:        %{name}_proxy.init
30 Source5:        %{name}_agent2.init
31 Patch0:         tld.patch
32 Patch1:         sqlite3_dbname.patch
33 Patch2:         always_compile_ipc.patch
34 URL:            https://www.zabbix.com/
35 BuildRequires:  OpenIPMI-devel
36 BuildRequires:  autoconf
37 BuildRequires:  automake >= 1:1.15
38 BuildRequires:  curl-devel
39 %{?with_agent2:BuildRequires:   golang}
40 %{?with_java:BuildRequires:     jdk}
41 BuildRequires:  libevent-devel
42 BuildRequires:  libssh2-devel
43 BuildRequires:  libtool
44 BuildRequires:  libxml2-devel
45 %{?with_mysql:BuildRequires:    mysql-devel}
46 BuildRequires:  net-snmp-devel
47 BuildRequires:  openldap-devel >= 2.4.6
48 BuildRequires:  openssl-devel >= 0.9.7d
49 BuildRequires:  pcre-devel
50 %{?with_pgsql:BuildRequires:    postgresql-devel}
51 BuildRequires:  rpmbuild(macros) >= 1.671
52 %{?with_sqlite3:BuildRequires:  sqlite3-devel}
53 BuildRequires:  unixODBC-devel
54 BuildRequires:  zlib-devel
55 Requires(postun):       /usr/sbin/groupdel
56 Requires(postun):       /usr/sbin/userdel
57 Requires(pre):  /bin/id
58 Requires(pre):  /usr/bin/getgid
59 Requires(pre):  /usr/sbin/groupadd
60 Requires(pre):  /usr/sbin/useradd
61 Provides:       group(zabbix)
62 Provides:       user(zabbix)
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _sysconfdir     /etc/%{name}
66 %define         _appdir         %{_datadir}/%{name}
67 %define         _webapps        /etc/webapps
68 %define         _webapp         %{name}
69
70 %description
71 Zabbix is software that monitors numerous parameters of a network and
72 the servers on that network. It is a useful tool for monitoring the
73 health and integrity of servers. Zabbix uses a flexible notification
74 mechanism that allows users to configure email based alerts for
75 virtually any event. All monitored parameters are stored in a
76 database. Zabbix offers excellent reporting and data visualisation
77 features based on the stored data. Zabbix supports both polling and
78 trapping. All Zabbix reports and statistics, as well as configuration
79 parameters, are accessed through a web-based front end.
80
81 %description -l pl.UTF-8
82 Zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
83 serwerów sieciowych. Jest przydatny przy monitorowaniu działania
84 serwerów. Jorzysta z elastycznego mechanizmu powiadamiania, który
85 pozwala użytkownikom konfigurować powiadamianie pocztą elektroniczną
86 dla praktycznie wszelkich zdarzeń. Monitorowane parametry są
87 przechowywane w bazie danych. W oparciu o przechowywane dane Zabbix
88 oferuje świetne raportowanie i funkcje wizualizacji. Wspiera zarówno
89 odpytywanie jak i pułapkowanie. Dostęp do wszystkich raportów i
90 statystyk Zabbixa jest możliwy poprzez interfejs oparty o WWW.
91
92 %package agentd
93 Summary:        Zabbix Agent
94 Summary(pl.UTF-8):      Agenta Zabbixa
95 Group:          Networking/Utilities
96 Requires:       %{name} = %{version}-%{release}
97 Obsoletes:      zabbix-agent-inetd
98 Obsoletes:      zabbix-agent-standalone
99 Requires(post,preun):   /sbin/chkconfig
100 Requires:       rc-scripts
101
102 %description agentd
103 Zabbix agent collects data from the local system for a Zabbix server.
104
105 %description agentd -l pl.UTF-8
106 Agent zbiera dane z lokalnej maszyny dla serwera Zabbix.
107
108 %package agent2
109 Summary:        Zabbix Agent 2
110 Summary(pl.UTF-8):      Agent 2 Zabbixa
111 Group:          Networking/Utilities
112 Requires:       %{name} = %{version}-%{release}
113 Requires(post,preun):   /sbin/chkconfig
114 Requires:       rc-scripts
115
116 %description agent2
117 Zabbix agent collects data from the local system for a Zabbix server.
118
119 %description agent2 -l pl.UTF-8
120 Agent zbiera dane z lokalnej maszyny dla serwera Zabbix.
121
122 %package web
123 Summary:        Web frontend for Zabbix
124 Summary(pl.UTF-8):      Interfejs Web dla Zabbixa
125 Group:          Applications/WWW
126 Requires:       php(bcmath)
127 Requires:       php(core) >= %{php_min_version}
128 Requires:       php(ctype)
129 Requires:       php(gd)
130 Requires:       php(gettext)
131 Requires:       php(json)
132 Requires:       php(mbstring)
133 Requires:       php(pcre)
134 Requires:       php(session)
135 Requires:       php(sockets)
136 Requires:       php(xml)
137 Requires:       php(xmlreader)
138 Requires:       php(xmlwriter)
139 Requires:       webapps
140 Requires:       webserver(alias)
141 Requires:       webserver(indexfile)
142 Requires:       webserver(php)
143 Suggests:       php(mysql)
144 Suggests:       php(pgsql)
145 Suggests:       php(sqlite3)
146 # used with sqlite3
147 Suggests:       php(sysvsem)
148 BuildArch:      noarch
149
150 %description web
151 This package provides web based (PHP) frontend for Zabbix.
152
153 %description web -l pl.UTF-8
154 Ten pakiet dostarcza napisany w PHP frontend dla Zabbixa.
155
156 %package proxy
157 Summary:        Zabbix proxy
158 Summary(pl.UTF-8):      Proxy do Zabbixa
159 Group:          Networking/Utilities
160 Requires:       %{name} = %{version}-%{release}
161 Requires:       zabbix-proxy(db) = %{version}-%{release}
162
163 %description proxy
164 This package provides the Zabbix proxy.
165
166 %description proxy -l pl.UTF-8
167 Ten pakiet zawiera proxy Zabbix.
168
169 %package proxy-mysql
170 Summary:        MySQL support for Zabbix proxy
171 Summary(pl.UTF-8):      Obsługa MySQL dla proxy do Zabbixa
172 Group:          Networking/Utilities
173 Provides:       %{name}-proxy(db) = %{version}-%{release}
174 Obsoletes:      zabbix-proxy-postgresql
175 Obsoletes:      zabbix-proxy-sqlite3
176
177 %description proxy-mysql
178 This package provides the Zabbix proxy binary with MySQL support.
179
180 %description proxy-mysql -l pl.UTF-8
181 Ten pakiet zawiera proxy Zabbix z obsługą MySQL.
182
183 %package proxy-postgresql
184 Summary:        PostgreSQL support for Zabbix proxy
185 Summary(pl.UTF-8):      Obsługa PostgreSQL dla proxy do Zabbixa
186 Group:          Networking/Utilities
187 Provides:       %{name}-proxy(db) = %{version}-%{release}
188 Obsoletes:      zabbix-proxy-mysql
189 Obsoletes:      zabbix-proxy-sqlite3
190
191 %description proxy-postgresql
192 This package provides the Zabbix proxy binary with PostgreSQL support.
193
194 %description proxy-postgresql -l pl.UTF-8
195 Ten pakiet zawiera proxy Zabbix z obsługą PostgreSQL.
196
197 %package proxy-sqlite3
198 Summary:        SQLite 3 support for Zabbix proxy
199 Summary(pl.UTF-8):      Obsługa SQLite 3 dla proxy do Zabbixa
200 Group:          Networking/Utilities
201 Provides:       %{name}-proxy(db) = %{version}-%{release}
202 Obsoletes:      zabbix-proxy-mysql
203 Obsoletes:      zabbix-proxy-postgresql
204
205 %description proxy-sqlite3
206 This package provides the Zabbix proxy binary with SQLite 3 support.
207
208 %description proxy-sqlite3 -l pl.UTF-8
209 Ten pakiet zawiera proxy Zabbix z obsługą SQLite 3.
210
211 %package server
212 Summary:        Zabbix server
213 Summary(pl.UTF-8):      Serwer Zabbixa
214 Group:          Networking/Utilities
215 Requires:       %{name} = %{version}-%{release}
216 Requires:       %{name}-server(db) = %{version}-%{release}
217 Obsoletes:      zabbix-suckerd
218 Obsoletes:      zabbix-trapper-inetd
219 Obsoletes:      zabbix-trapper-standalone
220
221 %description server
222 This package provides the Zabbix server.
223
224 %description server -l pl.UTF-8
225 Ten pakiet zawiera serwer Zabbixa.
226
227 %package server-mysql
228 Summary:        MySQL support for Zabbix server
229 Summary(pl.UTF-8):      Obsługa MySQL sla serwera Zabbixa
230 Group:          Networking/Utilities
231 Provides:       %{name}-server(db) = %{version}-%{release}
232 Obsoletes:      zabbix-server-postgresql
233 Obsoletes:      zabbix-server-sqlite3
234
235 %description server-mysql
236 This package provides the Zabbix server binary for use with MySQL
237 database.
238
239 %description server-mysql -l pl.UTF-8
240 Ten pakiet zawiera serwer Zabbixa z obsługą bazy danych MySQL.
241
242 %package server-postgresql
243 Summary:        PostgreSQL support for Zabbix server
244 Summary(pl.UTF-8):      Obsługa PostgreSQL sla serwera Zabbixa
245 Group:          Networking/Utilities
246 Provides:       %{name}-server(db) = %{version}-%{release}
247 Obsoletes:      zabbix-server-mysql
248 Obsoletes:      zabbix-server-sqlite3
249
250 %description server-postgresql
251 This package provides the Zabbix server binary for use with PostgreSQL
252 database.
253
254 %description server-postgresql -l pl.UTF-8
255 Ten pakiet zawiera serwer Zabbixa z obsługą bazy danych PostgreSQL.
256
257 %package java
258 Summary:        Zabbix Java Gateway
259 Group:          Networking/Utilities
260 Requires:       %{name} = %{version}-%{release}
261
262 %description java
263 This package provides the Zabbix Java Gateway.
264
265 %prep
266 %setup -q
267
268 %patch0 -p1
269 %patch1 -p1
270 %patch2 -p1
271
272 %build
273 %{__libtoolize}
274 %{__aclocal} -I m4
275 %{__autoconf}
276 %{__autoheader}
277 %{__automake}
278
279 configure() {
280         %configure \
281         --enable-agent \
282         %{__enable_disable agent2} \
283         --enable-ipv6 \
284         %{__enable_disable java} \
285         --with-jabber \
286         --with-ldap \
287         --with-libcurl \
288         --with-libxml2 \
289         --with-net-snmp \
290         --with-openipmi \
291         --with-openssl \
292         --with-ssh2 \
293         --with-unixodbc \
294         "$@"
295 }
296
297 configure \
298         --disable-server \
299         --disable-proxy
300
301 %{__make}
302
303 for database in %{databases} ; do
304         if [ "$database" = "sqlite3" ] ; then
305                 enable_server=""
306         else
307                 enable_server="--enable-server"
308         fi
309         configure \
310                 --with-$database \
311                 $enable_server \
312                 --enable-proxy
313
314         %{__make}
315
316         if [ "$enable_server" ] ; then
317                 %{__make} install \
318                         -C src/zabbix_server \
319                         DESTDIR=$PWD/install-${database}
320         fi
321
322         %{__make} install \
323                 -C src/zabbix_proxy \
324                 DESTDIR=$PWD/install-${database}
325 done
326
327 %install
328 rm -rf $RPM_BUILD_ROOT
329 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/etc/webapps/%{_webapp},%{_appdir}} \
330         $RPM_BUILD_ROOT{/var/run/zabbix,/var/log/zabbix}
331
332 %{__make} install \
333         DESTDIR=$RPM_BUILD_ROOT \
334         GOBIN=$RPM_BUILD_ROOT%{_sbindir} \
335         ZJG_DEST=$RPM_BUILD_ROOT%{_datadir}/zabbix_java
336
337 for database in %{databases} ; do
338         if [ "$database" != "sqlite3" ] ; then
339                 cp -p install-$database/%{_sbindir}/zabbix_server \
340                         $RPM_BUILD_ROOT%{_sbindir}/zabbix_server-$database
341         fi
342         cp -p install-$database/%{_sbindir}/zabbix_proxy \
343                 $RPM_BUILD_ROOT%{_sbindir}/zabbix_proxy-$database
344 done
345
346 if [ -n "$database" ] ; then
347         ln -sf %{_sbindir}/zabbix_server-$database $RPM_BUILD_ROOT%{_sbindir}/zabbix_server
348         ln -sf %{_sbindir}/zabbix_proxy-$database $RPM_BUILD_ROOT%{_sbindir}/zabbix_proxy
349 fi
350
351 cp -r ui $RPM_BUILD_ROOT%{_appdir}
352
353 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
354 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
355
356 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_agentd
357 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_server
358 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_proxy
359 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/zabbix_agent2
360
361 mv $RPM_BUILD_ROOT%{_appdir}/ui/conf $RPM_BUILD_ROOT%{_sysconfdir}/web
362 ln -s %{_sysconfdir}/web $RPM_BUILD_ROOT%{_appdir}/ui/conf
363 touch $RPM_BUILD_ROOT%{_sysconfdir}/web/zabbix.conf.php
364
365 %if %{with java}
366 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh $RPM_BUILD_ROOT%{_sysconfdir}/zabbix_java.conf
367 ln -s %{_sysconfdir}/zabbix_java.conf $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh
368 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback.xml
369 ln -s %{_sysconfdir}/java-logback.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml
370 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback-console.xml
371 ln -s %{_sysconfdir}/java-logback-console.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml
372
373 cat >$RPM_BUILD_ROOT%{_sbindir}/zabbix_java-start <<'EOF'
374 #!/bin/sh
375
376 exec %{_datadir}/zabbix_java/startup.sh "$@"
377 EOF
378
379 cat >$RPM_BUILD_ROOT%{_sbindir}/zabbix_java-stop <<'EOF'
380 #!/bin/sh
381
382 exec %{_datadir}/zabbix_java/shutdown.sh "$@"
383 EOF
384 %endif
385
386 %clean
387 rm -rf $RPM_BUILD_ROOT
388
389 %triggerin web -- apache < 2.2.0, apache-base
390 %webapp_register httpd %{_webapp}
391
392 %triggerun web -- apache < 2.2.0, apache-base
393 %webapp_unregister httpd %{_webapp}
394
395 %pre
396 %groupadd -g 111 zabbix
397 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
398 %addusertogroup -q zabbix proc
399
400 %postun
401 if [ "$1" = "0" ]; then
402         %userremove zabbix
403         %groupremove zabbix
404 fi
405
406 %post server-mysql
407 if [ "$1" = 1 ]; then
408         %banner -e %{name}-server <<-EOF
409         You should create database for Zabbix.
410
411         Running these should be fine in most cases:
412
413         mysqladmin create zabbix
414         zcat %{_docdir}/%{name}-server-mysql-%{version}/schema.sql.gz | mysql zabbix
415         zcat %{_docdir}/%{name}-server-mysql-%{version}/images.sql.gz | mysql zabbix
416         zcat %{_docdir}/%{name}-server-mysql-%{version}/data.sql.gz | mysql zabbix
417 EOF
418 fi
419 ln -sf %{_sbindir}/zabbix_server-mysql %{_sbindir}/zabbix_server || :
420
421 %post server-postgresql
422 if [ "$1" = 1 ]; then
423         %banner -e %{name}-server <<-EOF
424         You should create database for Zabbix.
425
426         Running these should be fine in most cases:
427
428         createuser -U postgres zabbix
429         createdb -U postgres -O zabbix zabbix
430         zcat %{_docdir}/%{name}-server-postgresql-%{version}/schema.sql.gz | psql -U zabbix zabbix
431         zcat %{_docdir}/%{name}-server-postgresql-%{version}/images.sql.gz | psql -U zabbix zabbix
432         zcat %{_docdir}/%{name}-server-postgresql-%{version}/data.sql.gz | psql -U zabbix zabbix
433 EOF
434 fi
435 ln -sf %{_sbindir}/zabbix_server-postgresql %{_sbindir}/zabbix_server || :
436
437 %post server
438 /sbin/chkconfig --add zabbix_server
439 %service zabbix_server restart
440
441 %postun server
442 if [ "$1" = "0" ]; then
443         %service -q zabbix_server stop
444         /sbin/chkconfig --del zabbix_server
445 fi
446 if [ "$1" = "0" ]; then
447         if [ -L %{_sbindir}/zabbix_server ] ; then
448                 rm -f %{_sbindir}/zabbix_server || :
449         fi
450 fi
451
452 %post agentd
453 /sbin/chkconfig --add zabbix_agentd
454 %service zabbix_agentd restart
455
456 %preun agentd
457 if [ "$1" = "0" ]; then
458         %service -q zabbix_agentd stop
459         /sbin/chkconfig --del zabbix_agentd
460 fi
461
462 %post agent2
463 /sbin/chkconfig --add zabbix_agent2
464 %service zabbix_agent2 restart
465
466 %preun agent2
467 if [ "$1" = "0" ]; then
468         %service -q zabbix_agent2 stop
469         /sbin/chkconfig --del zabbix_agent2
470 fi
471
472 %post proxy-mysql
473 ln -sf %{_sbindir}/zabbix_proxy-mysql %{_sbindir}/zabbix_proxy || :
474
475 %post proxy-postgresql
476 ln -sf %{_sbindir}/zabbix_proxy-postgresql %{_sbindir}/zabbix_proxy || :
477
478 %post proxy-sqlite3
479 ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || :
480
481 %post proxy
482 /sbin/chkconfig --add zabbix_server
483 %service zabbix_server restart
484
485 %postun proxy
486 if [ "$1" = "0" ]; then
487         %service -q zabbix_proxy stop
488         /sbin/chkconfig --del zabbix_proxy
489 fi
490 if [ "$1" = "0" ]; then
491         if [ -L %{_sbindir}/zabbix_proxy ] ; then
492                 rm -f %{_sbindir}/zabbix_proxy || :
493         fi
494 fi
495
496 %files
497 %defattr(644,root,root,755)
498 %doc AUTHORS ChangeLog README
499 %attr(755,root,root) %{_bindir}/zabbix_get
500 %attr(755,root,root) %{_bindir}/zabbix_js
501 %attr(755,root,root) %{_bindir}/zabbix_sender
502 %attr(751,root,zabbix) %dir %{_sysconfdir}
503 %attr(751,root,http) %dir %{_sysconfdir}/web
504 %dir %{_appdir}
505 %dir %attr(770,root,zabbix) /var/run/zabbix
506 %dir %attr(775,root,zabbix) /var/log/zabbix
507 %{_mandir}/man1/zabbix_get*
508 %{_mandir}/man1/zabbix_sender*
509
510 %files agentd
511 %defattr(644,root,root,755)
512 %doc conf/zabbix_agentd/*.conf
513 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
514 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agentd.conf.d
515 %attr(754,root,root) /etc/rc.d/init.d/zabbix_agentd
516 %attr(755,root,root) %{_sbindir}/zabbix_agentd
517 %{_mandir}/man8/zabbix_agentd*
518
519 %if %{with agent2}
520 %files agent2
521 %defattr(644,root,root,755)
522 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.conf
523 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agent2.d
524 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_agent2.d/plugins.d
525 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/ceph.conf
526 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/docker.conf
527 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/memcached.conf
528 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/modbus.conf
529 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/mqtt.conf
530 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/mysql.conf
531 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/oracle.conf
532 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/redis.conf
533 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent2.d/plugins.d/smart.conf
534 %attr(754,root,root) /etc/rc.d/init.d/zabbix_agent2
535 %attr(755,root,root) %{_sbindir}/zabbix_agent2
536 %{_mandir}/man8/zabbix_agent2*
537 %endif
538
539 %files web
540 %defattr(644,root,root,755)
541 %attr(750,root,http) %dir %{_webapps}/%{_webapp}
542 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
543 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
544 %ghost %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/zabbix.conf.php
545 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/.htaccess
546 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/maintenance.inc.php
547 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/web/zabbix.conf.php.example
548 %{_appdir}/ui
549
550 %if %{any_database}
551 %files proxy
552 %defattr(644,root,root,755)
553 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_proxy.conf
554 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_proxy.conf.d
555 %attr(754,root,root) /etc/rc.d/init.d/zabbix_proxy
556 %ghost %attr(755,root,root) %{_sbindir}/zabbix_proxy
557 %{_mandir}/man8/zabbix_proxy*
558 %endif
559
560 %if %{with mysql}
561 %files proxy-mysql
562 %defattr(644,root,root,755)
563 %attr(755,root,root) %{_sbindir}/zabbix_proxy-mysql
564 %endif
565
566 %if %{with pgsql}
567 %files proxy-postgresql
568 %defattr(644,root,root,755)
569 %attr(755,root,root) %{_sbindir}/zabbix_proxy-postgresql
570 %endif
571
572 %if %{with sqlite3}
573 %files proxy-sqlite3
574 %defattr(644,root,root,755)
575 %attr(755,root,root) %{_sbindir}/zabbix_proxy-sqlite3
576 %endif
577
578
579 %if %{any_database}
580 %files server
581 %defattr(644,root,root,755)
582 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
583 %dir %attr(751,root,zabbix) %{_sysconfdir}/zabbix_server.conf.d
584 %attr(754,root,root) /etc/rc.d/init.d/zabbix_server
585 %ghost %attr(755,root,root) %{_sbindir}/zabbix_server
586 %{_mandir}/man8/zabbix_server*
587 %endif
588
589 %if %{with mysql}
590 %files server-mysql
591 %defattr(644,root,root,755)
592 %doc database/mysql/*.sql
593 %attr(755,root,root) %{_sbindir}/zabbix_server-mysql
594 %endif
595
596 %if %{with pgsql}
597 %files server-postgresql
598 %defattr(644,root,root,755)
599 %doc database/postgresql/*.sql
600 %attr(755,root,root) %{_sbindir}/zabbix_server-postgresql
601 %endif
602
603 %if %{with java}
604 %files java
605 %defattr(644,root,root,755)
606 %attr(755,root,root) %{_sbindir}/zabbix_java-start
607 %attr(755,root,root) %{_sbindir}/zabbix_java-stop
608 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_java.conf
609 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback.xml
610 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback-console.xml
611 %dir %{_datadir}/zabbix_java
612 %{_datadir}/zabbix_java/bin
613 %{_datadir}/zabbix_java/lib
614 %{_datadir}/zabbix_java/settings.sh
615 %attr(755,root,root) %{_datadir}/zabbix_java/shutdown.sh
616 %attr(755,root,root) %{_datadir}/zabbix_java/startup.sh
617 %endif