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