]> git.pld-linux.org Git - packages/zabbix.git/blame_incremental - zabbix.spec
- package dir /usr/share/zabbix
[packages/zabbix.git] / zabbix.spec
... / ...
CommitLineData
1# TODO
2# - initscript for zabbix-agent-standalone and zabbix-server
3#
4# Conditional build:
5%bcond_with pgsql # enable PostgreSQL support (by default use mysql)
6%bcond_with oracle # enable Oracle support (by default use mysql)
7
8Summary: zabbix - network monitoring software
9Summary(pl.UTF-8): zabbix - oprogramowanie do monitorowania sieci
10Name: zabbix
11Version: 1.1.7
12Release: 1
13License: GPL v2+
14Group: Networking/Admin
15Source0: http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
16# Source0-md5: ac24ab58ef1a985c1e2a5217386d5dba
17Source1: %{name}-agent.inetd
18Source2: %{name}-apache.conf
19URL: http://zabbix.sourceforge.net/
20%{!?with_pgsql:BuildRequires: mysql-devel}
21BuildRequires: net-snmp-devel
22BuildRequires: openldap-devel >= 2.4.6
23BuildRequires: openssl-devel >= 0.9.7d
24%{?with_pgsql:BuildRequires: postgresql-devel}
25BuildRequires: rpmbuild(macros) >= 1.268
26Requires(postun): /usr/sbin/groupdel
27Requires(postun): /usr/sbin/userdel
28Requires(pre): /bin/id
29Requires(pre): /usr/bin/getgid
30Requires(pre): /usr/sbin/groupadd
31Requires(pre): /usr/sbin/useradd
32Provides: group(zabbix)
33Provides: user(zabbix)
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define _sysconfdir /etc/%{name}
37%define _appdir %{_datadir}/%{name}
38%define _webapps /etc/webapps
39%define _webapp %{name}
40
41%description
42zabbix is software that monitors numerous parameters of a network and
43the servers on that network. It is a useful tool for monitoring
44the health and integrity of servers. zabbix uses a flexible
45notification mechanism that allows users to configure email based
46alerts for virtually any event. All monitored parameters are stored in
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
50parameters, are accessed through a web-based front end.
51
52%description -l pl.UTF-8
53zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
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.
62
63%package agent-inetd
64Summary: inetd agent for zabbix
65Summary(pl.UTF-8): Wersja inetd agenta zabbiksa
66Group: Networking/Admin
67Requires: %{name} = %{version}-%{release}
68Requires: inetdaemon
69Obsoletes: zabbix-agent-standalone
70
71%description agent-inetd
72This package provides inetd version of zabbix agent.
73
74%description agent-inetd -l pl.UTF-8
75Ten pakiet dostarcza agenta zabbiksa dla inetd.
76
77%package agent-standalone
78Summary: Standalone agent for zabbix
79Summary(pl.UTF-8): Wersja wolnostojąca agenta zabbiksa
80Group: Networking/Admin
81Requires: %{name} = %{version}-%{release}
82Obsoletes: zabbix-agent-inetd
83
84%description agent-standalone
85This package provides standalone (recommended) version of zabbix agent.
86
87%description agent-standalone -l pl.UTF-8
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.
117
118%package sender
119Summary: Zabbix sender
120Summary(pl.UTF-8): Program zawiadamiający zabbiksa
121Group: Networking/Admin
122
123%description sender
124This package provides the zabbix sender.
125
126%description sender -l pl.UTF-8
127Ten pakiet zawiera program zawiadamiający zabbiksa.
128
129%package server
130Summary: Zabbix server
131Summary(pl.UTF-8): Serwer zabbiksa
132Group: Networking/Admin
133Requires: %{name} = %{version}-%{release}
134Obsoletes: %{name}-suckerd
135Obsoletes: %{name}-trapper-inetd
136Obsoletes: %{name}-trapper-standalone
137
138%description server
139This package provides the zabbix server.
140
141%description server -l pl.UTF-8
142Ten pakiet zawiera serwer zabbiksa.
143
144%prep
145%setup -q
146
147%build
148%configure \
149 %{!?with_pgsql:--with-mysql} \
150 %{?with_pgsql:--with-pgsql} \
151 %{?with_oracle:--with-oracle} \
152 --enable-server \
153 --enable-agent \
154 --with-net-snmp \
155 --with-ldap \
156# --with-ucd-snmp=DIR \
157
158%{__make}
159
160%install
161rm -rf $RPM_BUILD_ROOT
162install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig/rc-inetd,webapps/%{_webapp}},%{_appdir}}
163
164%{__make} install \
165 DESTDIR=$RPM_BUILD_ROOT
166
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
174
175%clean
176rm -rf $RPM_BUILD_ROOT
177
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
190%pre
191%groupadd -g 111 zabbix
192%useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
193
194%post
195if [ "$1" = 1 ]; then
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'
201 zcat %{_docdir}/%{name}-%{version}/create/postgresql/schema.sql.gz | psql zabbix
202 zcat %{_docdir}/%{name}-%{version}/create/data/data.sql.gz | psql zabbix
203 zcat %{_docdir}/%{name}-%{version}/create/data/images_pgsql.sql.gz | psql zabbix
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
208 zcat %{_docdir}/%{name}-%{version}/create/data/images.sql.gz | mysql zabbix
209%endif
210 %{?TODO:You also need zabbix-agent. install zabbix-agent-standalone %or zabbix-agent-inetd.}
211EOF
212fi
213
214%postun
215if [ "$1" = "0" ]; then
216 %userremove zabbix
217 %groupremove zabbix
218fi
219
220%post agent-inetd
221%service -q rc-inetd reload
222
223%postun agent-inetd
224if [ "$1" = 0 ]; then
225 %service -q rc-inetd reload
226fi
227
228%files
229%defattr(644,root,root,755)
230%doc AUTHORS FAQ NEWS README ChangeLog create upgrades bin/ZabbixW{32,64}.exe
231%attr(750,root,zabbix) %dir %{_sysconfdir}
232%dir %{_appdir}
233%dir %{_appdir}/frontends
234
235%files agent-inetd
236%defattr(644,root,root,755)
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
239%attr(755,root,root) %{_bindir}/zabbix_agent
240
241%files agent-standalone
242%defattr(644,root,root,755)
243%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
244%attr(755,root,root) %{_bindir}/zabbix_agentd
245
246%files frontend-php
247%defattr(644,root,root,755)
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
251
252%files get
253%defattr(644,root,root,755)
254%attr(755,root,root) %{_bindir}/zabbix_get
255
256%files sender
257%defattr(644,root,root,755)
258%attr(755,root,root) %{_bindir}/zabbix_sender
259
260%files server
261%defattr(644,root,root,755)
262%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
263%attr(755,root,root) %{_bindir}/zabbix_server
This page took 0.168692 seconds and 4 git commands to generate.