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