1 | %define ver 3.0.1 |
---|
2 | %define rel 1 |
---|
3 | |
---|
4 | Summary: The Enterprise-class Monitoring Solution for Everyone |
---|
5 | Name: zabbix |
---|
6 | Version: %{ver} |
---|
7 | Release: %{rel}%{?_dist_release} |
---|
8 | License: GPLv2 |
---|
9 | Group: Applications/Services |
---|
10 | URL: https://www.zabbix.com/ |
---|
11 | Source0: %{name}-%{version}.tar.gz |
---|
12 | Source1: zabbix_server.init |
---|
13 | Source2: zabbix_proxy.init |
---|
14 | Source3: zabbix_agentd.init |
---|
15 | Source4: zabbix_server.logrotate |
---|
16 | Source5: zabbix_proxy.logrotate |
---|
17 | Source6: zabbix_agentd.logrotate |
---|
18 | Patch0: zabbix-2.0.4-vine_path.patch |
---|
19 | Patch1: zabbix-2.0.4-font.patch |
---|
20 | Patch2: zabbix-2.0.4-config.patch |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
---|
22 | BuildRequires: libpq-devel |
---|
23 | BuildRequires: libmysqlclient-devel |
---|
24 | BuildRequires: curl-devel |
---|
25 | BuildRequires: net-snmp-devel |
---|
26 | BuildRequires: OpenIPMI-devel |
---|
27 | BuildRequires: unixODBC-devel |
---|
28 | BuildRequires: libssh2-devel |
---|
29 | Requires(pre): glibc-common |
---|
30 | Requires(pre): shadow-utils |
---|
31 | |
---|
32 | Vendor: Project Vine |
---|
33 | Distribution: Vine Linux |
---|
34 | Packager: iwaim |
---|
35 | |
---|
36 | %description |
---|
37 | The Enterprise-class Monitoring Solution for Everyone. |
---|
38 | |
---|
39 | %package server-common |
---|
40 | Summary: common files for Zabbix Server |
---|
41 | Requires: %{name} == %{version}-%{release} |
---|
42 | Requires(post,preun): chkconfig |
---|
43 | Requires(preun,postun): initscripts |
---|
44 | |
---|
45 | %description server-common |
---|
46 | This package include common files for Zabbix Server. |
---|
47 | |
---|
48 | %package server-mysql |
---|
49 | Summary: Zabbix Server for MySQL/MariaDB |
---|
50 | Provides: %{name}-server |
---|
51 | Requires: %{name}-server-common == %{version}-%{release} |
---|
52 | |
---|
53 | %description server-mysql |
---|
54 | Zabbix Server for MySQL/MariaDB |
---|
55 | |
---|
56 | %package server-postgresql |
---|
57 | Summary: Zabbix Server for PostgreSQL |
---|
58 | Provides: %{name}-server |
---|
59 | Requires: %{name}-server-common == %{version}-%{release} |
---|
60 | |
---|
61 | %description server-postgresql |
---|
62 | Zabbix Server for PostgreSQL |
---|
63 | |
---|
64 | %package agent |
---|
65 | Summary: Zabbix Agent |
---|
66 | Requires: %{name} == %{version}-%{release} |
---|
67 | Requires(post,preun): chkconfig |
---|
68 | Requires(preun,postun): initscripts |
---|
69 | |
---|
70 | %description agent |
---|
71 | Zabbix Agent |
---|
72 | |
---|
73 | %package proxy-common |
---|
74 | Summary: common files for Zabbix Proxy |
---|
75 | Requires: %{name} == %{version}-%{release} |
---|
76 | Requires(post,preun): chkconfig |
---|
77 | Requires(preun,postun): initscripts |
---|
78 | |
---|
79 | %description proxy-common |
---|
80 | This package include common files for Zabbix Proxy |
---|
81 | |
---|
82 | %package proxy-mysql |
---|
83 | Summary: Zabbix Proxy for MySQL/MariaDB |
---|
84 | Provides: %{name}-proxy |
---|
85 | Requires: %{name}-proxy-common == %{version}-%{release} |
---|
86 | |
---|
87 | %description proxy-mysql |
---|
88 | Zabbix Proxy for MySQL/MariaDB |
---|
89 | |
---|
90 | %package proxy-postgresql |
---|
91 | Summary: Zabbix Proxy for PostgreSQL |
---|
92 | Provides: %{name}-proxy |
---|
93 | Requires: %{name}-proxy-common == %{version}-%{release} |
---|
94 | |
---|
95 | %description proxy-postgresql |
---|
96 | Zabbix Proxy for PostgreSQL |
---|
97 | |
---|
98 | %package frontend-php |
---|
99 | Summary: Zabbix web frontend with PHP |
---|
100 | Group: Applications/Internet |
---|
101 | Requires: php5 |
---|
102 | Requires: TrueType-vlgothic |
---|
103 | |
---|
104 | %description frontend-php |
---|
105 | Zabbix web frontend with PHP. |
---|
106 | |
---|
107 | %package frontend-php-mysql |
---|
108 | Summary: Zabbix web frontend with PHP and MySQL/MariaDB |
---|
109 | Group: Applications/Internet |
---|
110 | Provides: %{name}-frontend-php == %{version}-%{release} |
---|
111 | Requires: php5-mysql |
---|
112 | |
---|
113 | %description frontend-php-mysql |
---|
114 | Zabbix web frontend with PHP and MySQL/MariaDB. |
---|
115 | |
---|
116 | %package frontend-php-postgresql |
---|
117 | Summary: Zabbix web frontend with PHP and PostgreSQL |
---|
118 | Group: Applications/Internet |
---|
119 | Provides: %{name}-frontend-php == %{version}-%{release} |
---|
120 | Requires: php5-pgsql |
---|
121 | |
---|
122 | %description frontend-php-postgresql |
---|
123 | Zabbix web frontend with PHP and PostgreSQL. |
---|
124 | |
---|
125 | %prep |
---|
126 | %setup -q -T -a 0 -c -n zabbix-%{version} |
---|
127 | mv zabbix-%{version} zabbix_mysql |
---|
128 | pushd zabbix_mysql |
---|
129 | %patch0 -p 1 |
---|
130 | %patch1 -p 1 |
---|
131 | %patch2 -p 1 |
---|
132 | popd |
---|
133 | |
---|
134 | %setup -q -D -T -a 0 -n zabbix-%{version} |
---|
135 | mv zabbix-%{version} zabbix_pgsql |
---|
136 | pushd zabbix_pgsql |
---|
137 | %patch0 -p 1 |
---|
138 | %patch1 -p 1 |
---|
139 | %patch2 -p 1 |
---|
140 | popd |
---|
141 | |
---|
142 | %build |
---|
143 | |
---|
144 | Build() |
---|
145 | { |
---|
146 | %configure \ |
---|
147 | --enable-server \ |
---|
148 | --enable-proxy \ |
---|
149 | --enable-ipv6 \ |
---|
150 | --sysconfdir=%{_sysconfdir}/zabbix \ |
---|
151 | --with-libcurl \ |
---|
152 | --with-openipmi \ |
---|
153 | --with-net-snmp \ |
---|
154 | --with-unixodbc \ |
---|
155 | --with-ssh2 \ |
---|
156 | $@ |
---|
157 | |
---|
158 | %__make |
---|
159 | } |
---|
160 | |
---|
161 | pushd zabbix_mysql |
---|
162 | Build --with-mysql \ |
---|
163 | --enable-agent |
---|
164 | popd |
---|
165 | |
---|
166 | pushd zabbix_pgsql |
---|
167 | Build --with-postgresql |
---|
168 | popd |
---|
169 | |
---|
170 | |
---|
171 | %install |
---|
172 | %__rm -rf $RPM_BUILD_ROOT |
---|
173 | pushd zabbix_mysql |
---|
174 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
175 | |
---|
176 | mv -f %{buildroot}%{_sbindir}/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.mysql |
---|
177 | mv -f %{buildroot}%{_sbindir}/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.mysql |
---|
178 | |
---|
179 | # make directories |
---|
180 | %__mkdir_p $RPM_BUILD_ROOT%{_localstatedir}/{log,run}/%{name} |
---|
181 | |
---|
182 | # DB |
---|
183 | %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix |
---|
184 | %__cp -a database/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix/ |
---|
185 | %__cp -a database/mysql $RPM_BUILD_ROOT%{_datadir}/zabbix/ |
---|
186 | |
---|
187 | # init.d |
---|
188 | %__mkdir_p $RPM_BUILD_ROOT%{_initddir} |
---|
189 | %__cp %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/zabbix_server |
---|
190 | %__cp %{SOURCE2} $RPM_BUILD_ROOT%{_initddir}/zabbix_proxy |
---|
191 | %__cp %{SOURCE3} $RPM_BUILD_ROOT%{_initddir}/zabbix_agentd |
---|
192 | |
---|
193 | # logrotate |
---|
194 | %__mkdir_p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d |
---|
195 | %__cp %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_server |
---|
196 | %__cp %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
197 | %__cp %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_agentd |
---|
198 | |
---|
199 | # frontend-php |
---|
200 | %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend |
---|
201 | %__cp -a frontends/php $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/ |
---|
202 | %__rm -f $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/fonts/DejaVuSans.ttf |
---|
203 | |
---|
204 | ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf \ |
---|
205 | $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/fonts/ |
---|
206 | |
---|
207 | # proxy |
---|
208 | mkdir -p %{buildroot}%{_datadir}/zabbix-proxy |
---|
209 | ln -sf ../zabbix/mysql %{buildroot}%{_datadir}/zabbix-proxy/ |
---|
210 | ln -sf ../zabbix/postgresql %{buildroot}%{_datadir}/zabbix-proxy/ |
---|
211 | |
---|
212 | popd |
---|
213 | |
---|
214 | pushd zabbix_pgsql |
---|
215 | install -m755 src/zabbix_server/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.pgsql |
---|
216 | install -m755 src/zabbix_proxy/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.pgsql |
---|
217 | popd |
---|
218 | |
---|
219 | %clean |
---|
220 | %__rm -rf $RPM_BUILD_ROOT |
---|
221 | |
---|
222 | %pre |
---|
223 | getent group zabbix >/dev/null || groupadd -r zabbix |
---|
224 | getent passwd zabbix >/dev/null || \ |
---|
225 | useradd -r -g zabbix -d %{_sysconfdir}/zabbix -s /sbin/nologin \ |
---|
226 | -c "Zabbix Monitoring Solution" zabbix |
---|
227 | exit 0 |
---|
228 | |
---|
229 | %post server-mysql |
---|
230 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
231 | zabbix_server /usr/sbin/zabbix_server.mysql 10 |
---|
232 | |
---|
233 | /sbin/chkconfig --add zabbix_server |
---|
234 | |
---|
235 | %post server-postgresql |
---|
236 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
237 | zabbix_server /usr/sbin/zabbix_server.pgsql 10 |
---|
238 | |
---|
239 | /sbin/chkconfig --add zabbix_server |
---|
240 | |
---|
241 | %post proxy-mysql |
---|
242 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
243 | zabbix_proxy /usr/sbin/zabbix_proxy.mysql 10 |
---|
244 | |
---|
245 | /sbin/chkconfig --add zabbix_proxy |
---|
246 | |
---|
247 | %post proxy-postgresql |
---|
248 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
249 | zabbix_proxy /usr/sbin/zabbix_proxy.pgsql 10 |
---|
250 | |
---|
251 | /sbin/chkconfig --add zabbix_proxy |
---|
252 | |
---|
253 | %post agent |
---|
254 | /sbin/chkconfig --add zabbix_agentd |
---|
255 | |
---|
256 | %preun server-mysql |
---|
257 | if [ "$1" -eq 0 ]; then |
---|
258 | /sbin/service zabbix_server stop >/dev/null 2>&1 |
---|
259 | /sbin/chkconfig --del zabbix_server |
---|
260 | /sbin/update-alternatives --remove zabbix_server \ |
---|
261 | /usr/sbin/zabbix_server.mysql |
---|
262 | fi |
---|
263 | |
---|
264 | %preun server-postgresql |
---|
265 | if [ "$1" -eq 0 ]; then |
---|
266 | /sbin/service zabbix_server stop >/dev/null 2>&1 |
---|
267 | /sbin/chkconfig --del zabbix_server |
---|
268 | /sbin/update-alternatives --remove zabbix_server \ |
---|
269 | /usr/sbin/zabbix_server.pgsql |
---|
270 | fi |
---|
271 | |
---|
272 | %preun proxy-mysql |
---|
273 | if [ "$1" -eq 0 ]; then |
---|
274 | /sbin/service zabbix_proxy stop >/dev/null 2>&1 |
---|
275 | /sbin/chkconfig --del zabbix_proxy |
---|
276 | /sbin/update-alternatives --remove zabbix_proxy \ |
---|
277 | /usr/sbin/zabbix_proxy.mysql |
---|
278 | fi |
---|
279 | |
---|
280 | %preun proxy-postgresql |
---|
281 | if [ "$1" -eq 0 ]; then |
---|
282 | /sbin/service zabbix_proxy stop >/dev/null 2>&1 |
---|
283 | /sbin/chkconfig --del zabbix_proxy |
---|
284 | /sbin/update-alternatives --remove zabbix_proxy \ |
---|
285 | /usr/sbin/zabbix_proxy.pgsql |
---|
286 | fi |
---|
287 | |
---|
288 | %preun agent |
---|
289 | if [ "$1" -eq 0 ]; then |
---|
290 | /sbin/service zabbix_agentd stop >/dev/null 2>&1 |
---|
291 | /sbin/chkconfig --del zabbix_agentd |
---|
292 | fi |
---|
293 | |
---|
294 | %postun server-mysql |
---|
295 | if [ "$1" -ge "1" ]; then |
---|
296 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
297 | fi |
---|
298 | |
---|
299 | %postun server-postgresql |
---|
300 | if [ "$1" -ge "1" ]; then |
---|
301 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
302 | fi |
---|
303 | |
---|
304 | %postun proxy-mysql |
---|
305 | if [ "$1" -ge "1" ]; then |
---|
306 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
307 | fi |
---|
308 | |
---|
309 | %postun proxy-postgresql |
---|
310 | if [ "$1" -ge "1" ]; then |
---|
311 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
312 | fi |
---|
313 | |
---|
314 | %postun agent |
---|
315 | if [ "$1" -ge "1" ]; then |
---|
316 | /sbin/service zabbix_agentd condrestart >/dev/null 2>&1 || : |
---|
317 | fi |
---|
318 | |
---|
319 | %files |
---|
320 | %defattr(-,root,root,-) |
---|
321 | %doc zabbix_mysql/AUTHORS zabbix_mysql/COPYING zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
322 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name} |
---|
323 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name} |
---|
324 | %dir %{_datadir}/zabbix |
---|
325 | %{_datadir}/zabbix/mysql |
---|
326 | %{_datadir}/zabbix/postgresql |
---|
327 | |
---|
328 | %files server-common |
---|
329 | %defattr(-,root,root,-) |
---|
330 | %dir %{_sysconfdir}/zabbix |
---|
331 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf |
---|
332 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_server |
---|
333 | %{_initddir}/zabbix_server* |
---|
334 | %{_mandir}/man8/zabbix_server.8* |
---|
335 | |
---|
336 | %files server-mysql |
---|
337 | %defattr(-,root,root,-) |
---|
338 | %{_sbindir}/zabbix_server.mysql |
---|
339 | |
---|
340 | %files server-postgresql |
---|
341 | %defattr(-,root,root,-) |
---|
342 | %{_sbindir}/zabbix_server.pgsql |
---|
343 | |
---|
344 | %files agent |
---|
345 | %defattr(-,root,root,-) |
---|
346 | %dir %{_sysconfdir}/zabbix |
---|
347 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf |
---|
348 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_agentd |
---|
349 | %{_bindir}/zabbix_get |
---|
350 | %{_bindir}/zabbix_sender |
---|
351 | %{_sbindir}/zabbix_agentd |
---|
352 | %{_initddir}/zabbix_agentd |
---|
353 | %{_mandir}/man1/zabbix_get.1* |
---|
354 | %{_mandir}/man1/zabbix_sender.1* |
---|
355 | %{_mandir}/man8/zabbix_agentd.8* |
---|
356 | |
---|
357 | %files proxy-common |
---|
358 | %defattr(-,root,root,-) |
---|
359 | %dir %{_sysconfdir}/zabbix |
---|
360 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf |
---|
361 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
362 | %{_initddir}/zabbix_proxy |
---|
363 | %{_mandir}/man8/zabbix_proxy.8* |
---|
364 | %{_datadir}/zabbix-proxy |
---|
365 | |
---|
366 | %files proxy-mysql |
---|
367 | %defattr(-,root,root,-) |
---|
368 | %{_sbindir}/zabbix_proxy.mysql |
---|
369 | |
---|
370 | %files proxy-postgresql |
---|
371 | %defattr(-,root,root,-) |
---|
372 | %{_sbindir}/zabbix_proxy.pgsql |
---|
373 | |
---|
374 | %files frontend-php |
---|
375 | %defattr(-,root,root,-) |
---|
376 | %doc zabbix_mysql/AUTHORS zabbix_mysql/COPYING zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
377 | %dir %{_datadir}/zabbix-frontend |
---|
378 | %{_datadir}/zabbix-frontend/php |
---|
379 | |
---|
380 | %files frontend-php-mysql |
---|
381 | |
---|
382 | %files frontend-php-postgresql |
---|
383 | |
---|
384 | %changelog |
---|
385 | * Fri Mar 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.1-1 |
---|
386 | - new upstream release. |
---|
387 | - disabled jabber support. |
---|
388 | |
---|
389 | * Wed Sep 9 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.6-1 |
---|
390 | - new upstream release. |
---|
391 | |
---|
392 | * Sat Apr 11 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.9-1 |
---|
393 | - new upstream release. |
---|
394 | |
---|
395 | * Sun Jul 6 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.4-1 |
---|
396 | - new upstream release. |
---|
397 | - built with both of mysql and postgresql. |
---|
398 | |
---|
399 | * Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.8-1 |
---|
400 | - update to 2.0.8 |
---|
401 | |
---|
402 | * Wed Feb 20 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.5-2 |
---|
403 | - use %%bcond_with mysql to build with mysql |
---|
404 | |
---|
405 | * Tue Feb 19 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.5-1 |
---|
406 | - update to 2.0.5 |
---|
407 | - add using MySQL client library switch: default no |
---|
408 | - define use_postfix and use_mysql |
---|
409 | - add BuildRequires: MySQL-devel |
---|
410 | - add configure option: --with-mysql |
---|
411 | |
---|
412 | * Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1 |
---|
413 | - initial build for Vine Linux |
---|