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