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