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