source: projects/specs/trunk/z/zabbix/zabbix-vl.spec @ 12317

Revision 12317, 13.4 KB checked in by tomop, 4 years ago (diff)

updated 7 packages

dovecot-2.3.9.2-1

mariadb-10.4.11-1

openssl-1.1.1d-2

php73-7.3.13-1

spamassassin-3.4.3-1

squid-4.9-1

zabbix-4.0.15-1

RevLine 
[12317]1%define ver 4.0.15
[11880]2%define rel 1
[7440]3
[11716]4%define only_agent 0
5
6%if %{only_agent}
7%bcond_with server
8%bcond_with proxy
9%bcond_with frontend
10%else
11%bcond_without server
12%bcond_without proxy
13%bcond_without frontend
14%endif
15
16%bcond_without agent
17
[7440]18Summary: The Enterprise-class Monitoring Solution for Everyone
19Name: zabbix
20Version: %{ver}
21Release: %{rel}%{?_dist_release}
22License: GPLv2
23Group: Applications/Services
24URL: https://www.zabbix.com/
[12317]25Source0: https://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/%{version}/%{name}-%{version}.tar.gz
[7440]26Source1: zabbix_server.init
27Source2: zabbix_proxy.init
28Source3: zabbix_agentd.init
29Source4: zabbix_server.logrotate
30Source5: zabbix_proxy.logrotate
31Source6: zabbix_agentd.logrotate
[12073]32Patch1: 0001-change-the-font-for-Vine-Linux.patch
33Patch2: 0002-modified-config-files-for-Vine-Linux.patch
[12317]34Patch3: zabbix-4.0.15-php74.patch
[7440]35BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
[11716]36%if %{with server}%{with proxy}
[8748]37BuildRequires: libpq-devel
[11880]38BuildRequires: libmariadb-devel
[11716]39%endif
[12073]40BuildRequires: libevent-devel
41BuildRequires: pcre-devel
[7440]42BuildRequires: curl-devel
43BuildRequires: net-snmp-devel
44BuildRequires: OpenIPMI-devel
45BuildRequires: unixODBC-devel
46BuildRequires: libssh2-devel
47Requires(pre): glibc-common
48Requires(pre): shadow-utils
49
50Vendor: Project Vine
51Distribution: Vine Linux
52Packager: iwaim
53
54%description
55The Enterprise-class Monitoring Solution for Everyone.
56
[11716]57%if %{with server}
[8748]58%package server-common
59Summary: common files for Zabbix Server
[7440]60Requires: %{name} == %{version}-%{release}
61Requires(post,preun): chkconfig
62Requires(preun,postun): initscripts
63
[8748]64%description server-common
65This package include common files for Zabbix Server.
[7440]66
[8748]67%package server-mysql
68Summary: Zabbix Server for MySQL/MariaDB
69Provides: %{name}-server
70Requires: %{name}-server-common == %{version}-%{release}
71
72%description server-mysql
73Zabbix Server for MySQL/MariaDB
74
75%package server-postgresql
76Summary: Zabbix Server for PostgreSQL
77Provides: %{name}-server
78Requires: %{name}-server-common == %{version}-%{release}
79
80%description server-postgresql
81Zabbix Server for PostgreSQL
82
[11716]83%endif
84
85%if %{with agent}
[7440]86%package agent
87Summary: Zabbix Agent
88Requires: %{name} == %{version}-%{release}
89Requires(post,preun): chkconfig
90Requires(preun,postun): initscripts
91
92%description agent
93Zabbix Agent
94
[11716]95%endif
96
97%if %{with proxy}
[8748]98%package proxy-common
99Summary: common files for Zabbix Proxy
[7440]100Requires: %{name} == %{version}-%{release}
101Requires(post,preun): chkconfig
102Requires(preun,postun): initscripts
103
[8748]104%description proxy-common
105This package include common files for Zabbix Proxy
[7440]106
[8748]107%package proxy-mysql
108Summary: Zabbix Proxy for MySQL/MariaDB
109Provides: %{name}-proxy
110Requires: %{name}-proxy-common == %{version}-%{release}
111
112%description proxy-mysql
113Zabbix Proxy for MySQL/MariaDB
114
115%package proxy-postgresql
116Summary: Zabbix Proxy for PostgreSQL
117Provides: %{name}-proxy
118Requires: %{name}-proxy-common == %{version}-%{release}
119
120%description proxy-postgresql
121Zabbix Proxy for PostgreSQL
122
[11716]123%endif
124
125%if %{with frontend}
[7440]126%package frontend-php
127Summary: Zabbix web frontend with PHP
128Group: Applications/Internet
129Requires: php5
130Requires: TrueType-vlgothic
131
132%description frontend-php
133Zabbix web frontend with PHP.
134
[8748]135%package frontend-php-mysql
136Summary: Zabbix web frontend with PHP and MySQL/MariaDB
137Group: Applications/Internet
138Provides: %{name}-frontend-php == %{version}-%{release}
139Requires: php5-mysql
140
141%description frontend-php-mysql
142Zabbix web frontend with PHP and MySQL/MariaDB.
143
144%package frontend-php-postgresql
145Summary: Zabbix web frontend with PHP and PostgreSQL
146Group: Applications/Internet
147Provides: %{name}-frontend-php == %{version}-%{release}
148Requires: php5-pgsql
149
150%description frontend-php-postgresql
151Zabbix web frontend with PHP and PostgreSQL.
152
[11716]153%endif
154
[7440]155%prep
[8748]156%setup -q -T -a 0 -c -n zabbix-%{version}
157mv zabbix-%{version} zabbix_mysql
158pushd zabbix_mysql
[7440]159%patch1 -p 1
160%patch2 -p 1
[12317]161%patch3 -p 1
[8748]162popd
[7440]163
[11716]164%if %{with server}%{with proxy}
[8748]165%setup -q -D -T -a 0 -n zabbix-%{version}
166mv zabbix-%{version} zabbix_pgsql
167pushd zabbix_pgsql
168%patch1 -p 1
169%patch2 -p 1
[12317]170%patch3 -p 1
[8748]171popd
[11716]172%endif
[8748]173
[7440]174%build
[8748]175
176Build()
177{
[12073]178perl -pi -e 's|/usr/bin/traceroute|/bin/traceroute|' \
179    ./database/{ibm_db2,mysql,oracle,postgresql,sqlite3}/data.sql
180
[8748]181%configure \
[11716]182           %{?with_server:--enable-server} \
183           %{?with_proxy:--enable-proxy} \
[12277]184           %{?with_agent:--enable-agent} \
[8748]185           --enable-ipv6 \
[7440]186           --sysconfdir=%{_sysconfdir}/zabbix \
187           --with-libcurl \
188           --with-openipmi \
189           --with-net-snmp \
190           --with-unixodbc \
[8748]191           --with-ssh2 \
192           $@
[7440]193
194%__make
[8748]195}
[7440]196
[11716]197%if %{with server}%{with proxy}
[8748]198pushd zabbix_mysql
[11716]199Build --with-mysql
[8748]200popd
201
202pushd zabbix_pgsql
203Build --with-postgresql
204popd
[11716]205%else
206pushd zabbix_mysql
207Build
208popd
209%endif
[8748]210
[7440]211%install
212%__rm -rf $RPM_BUILD_ROOT
[8748]213pushd zabbix_mysql
[7440]214make DESTDIR=$RPM_BUILD_ROOT install
215
[11716]216%if %{with server}
[8748]217mv -f %{buildroot}%{_sbindir}/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.mysql
[11716]218%endif
219%if %{with proxy}
[8748]220mv -f %{buildroot}%{_sbindir}/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.mysql
[11716]221%endif
[8748]222
[7440]223# make directories
224%__mkdir_p $RPM_BUILD_ROOT%{_localstatedir}/{log,run}/%{name}
225
226# DB
227%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix
[11716]228%if %{with server}%{with proxy}
[7440]229%__cp -a database/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix/
[7480]230%__cp -a database/mysql $RPM_BUILD_ROOT%{_datadir}/zabbix/
[11716]231%endif
[7440]232
233# init.d
234%__mkdir_p $RPM_BUILD_ROOT%{_initddir}
[11716]235%if %{with server}
[7440]236%__cp %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/zabbix_server
[11716]237%endif
238%if %{with proxy}
[7440]239%__cp %{SOURCE2} $RPM_BUILD_ROOT%{_initddir}/zabbix_proxy
[11716]240%endif
241%if %{with agent}
[7440]242%__cp %{SOURCE3} $RPM_BUILD_ROOT%{_initddir}/zabbix_agentd
[11716]243%endif
[7440]244
245# logrotate
246%__mkdir_p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
[11716]247%if %{with server}
[7440]248%__cp %{SOURCE4}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_server
[11716]249%endif
250%if %{with proxy}
[7440]251%__cp %{SOURCE5}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_proxy
[11716]252%endif
253%if %{with agent}
[7440]254%__cp %{SOURCE6}  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix_agentd
[11716]255%endif
[7440]256
[11716]257%if %{with frontend}
[7440]258# frontend-php
259%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend
260%__cp -a frontends/php $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/
[12277]261%__rm -f $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/assets/fonts/DejaVuSans.ttf
[7440]262
263ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf \
[12277]264      $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend/php/assets/fonts/
[11716]265%endif
[7440]266
[11716]267%if %{with proxy}
[8748]268# proxy
269mkdir -p %{buildroot}%{_datadir}/zabbix-proxy
270ln -sf ../zabbix/mysql %{buildroot}%{_datadir}/zabbix-proxy/
271ln -sf ../zabbix/postgresql %{buildroot}%{_datadir}/zabbix-proxy/
[11716]272%endif
[8748]273
274popd
275
[11716]276%if %{with server}%{with proxy}
[8748]277pushd zabbix_pgsql
278install -m755 src/zabbix_server/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.pgsql
279install -m755 src/zabbix_proxy/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.pgsql
280popd
[11716]281%endif
[8748]282
[7440]283%clean
284%__rm -rf $RPM_BUILD_ROOT
285
286%pre
287getent group zabbix >/dev/null || groupadd -r zabbix
288getent passwd zabbix >/dev/null || \
289useradd -r -g zabbix -d %{_sysconfdir}/zabbix -s /sbin/nologin \
290-c "Zabbix Monitoring Solution" zabbix
291exit 0
292
[11716]293%if %{with server}
[8748]294%post server-mysql
295/sbin/update-alternatives --install /usr/sbin/zabbix_server \
296        zabbix_server /usr/sbin/zabbix_server.mysql 10
297
[7440]298/sbin/chkconfig --add zabbix_server
299
[8748]300%post server-postgresql
301/sbin/update-alternatives --install /usr/sbin/zabbix_server \
302        zabbix_server /usr/sbin/zabbix_server.pgsql 10
303
304/sbin/chkconfig --add zabbix_server
305
[11716]306%endif
307
308%if %{with proxy}
[8748]309%post proxy-mysql
310/sbin/update-alternatives --install /usr/sbin/zabbix_proxy \
311        zabbix_proxy /usr/sbin/zabbix_proxy.mysql 10
312
[7440]313/sbin/chkconfig --add zabbix_proxy
314
[8748]315%post proxy-postgresql
316/sbin/update-alternatives --install /usr/sbin/zabbix_proxy \
317        zabbix_proxy /usr/sbin/zabbix_proxy.pgsql 10
318
319/sbin/chkconfig --add zabbix_proxy
320
[11716]321%endif
322
323%if %{with agent}
[7440]324%post agent
325/sbin/chkconfig --add zabbix_agentd
326
[11716]327%endif
328
329%if %{with server}
[8748]330%preun server-mysql
[7440]331if [ "$1" -eq 0 ]; then
332        /sbin/service zabbix_server stop >/dev/null 2>&1
333        /sbin/chkconfig --del zabbix_server
[8748]334        /sbin/update-alternatives --remove zabbix_server \
335                /usr/sbin/zabbix_server.mysql
[7440]336fi
337
[8748]338%preun server-postgresql
[7440]339if [ "$1" -eq 0 ]; then
[8748]340        /sbin/service zabbix_server stop >/dev/null 2>&1
341        /sbin/chkconfig --del zabbix_server
342        /sbin/update-alternatives --remove zabbix_server \
343                /usr/sbin/zabbix_server.pgsql
344fi
345
[11716]346%endif
347
348%if %{with proxy}
[8748]349%preun proxy-mysql
350if [ "$1" -eq 0 ]; then
[7440]351        /sbin/service zabbix_proxy stop >/dev/null 2>&1
352        /sbin/chkconfig --del zabbix_proxy
[8748]353        /sbin/update-alternatives --remove zabbix_proxy \
354                /usr/sbin/zabbix_proxy.mysql
[7440]355fi
356
[8748]357%preun proxy-postgresql
358if [ "$1" -eq 0 ]; then
359        /sbin/service zabbix_proxy stop >/dev/null 2>&1
360        /sbin/chkconfig --del zabbix_proxy
361        /sbin/update-alternatives --remove zabbix_proxy \
362                /usr/sbin/zabbix_proxy.pgsql
363fi
364
[11716]365%endif
366
367%if %{with agent}
[7440]368%preun agent
369if [ "$1" -eq 0 ]; then
370        /sbin/service zabbix_agentd stop >/dev/null 2>&1
371        /sbin/chkconfig --del zabbix_agentd
372fi
373
[11716]374%endif
375
376%if %{with server}
[8748]377%postun server-mysql
[7440]378if [ "$1" -ge "1" ]; then
379        /sbin/service zabbix_server condrestart >/dev/null 2>&1 || :
380fi
381
[8748]382%postun server-postgresql
[7440]383if [ "$1" -ge "1" ]; then
[8748]384        /sbin/service zabbix_server condrestart >/dev/null 2>&1 || :
385fi
386
[11716]387%endif
388
389%if %{with proxy}
[8748]390%postun proxy-mysql
391if [ "$1" -ge "1" ]; then
[7440]392        /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || :
393fi
394
[8748]395%postun proxy-postgresql
396if [ "$1" -ge "1" ]; then
397        /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || :
398fi
399
[7440]400%postun agent
401if [ "$1" -ge "1" ]; then
402        /sbin/service zabbix_agentd condrestart >/dev/null 2>&1 || :
403fi
404
[11716]405%endif
406
[7440]407%files
408%defattr(-,root,root,-)
[12073]409%license zabbix_mysql/COPYING
410%doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README
[7440]411%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name}
412%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name}
413%dir %{_datadir}/zabbix
[11716]414%if %{with server}%{with proxy}
[8748]415%{_datadir}/zabbix/mysql
[7440]416%{_datadir}/zabbix/postgresql
[11716]417%endif
[7440]418
[11716]419%if %{with server}
[8748]420%files server-common
[7440]421%defattr(-,root,root,-)
422%dir %{_sysconfdir}/zabbix
423%config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf
424%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_server
425%{_initddir}/zabbix_server*
426%{_mandir}/man8/zabbix_server.8*
427
[8748]428%files server-mysql
429%defattr(-,root,root,-)
430%{_sbindir}/zabbix_server.mysql
431
432%files server-postgresql
433%defattr(-,root,root,-)
434%{_sbindir}/zabbix_server.pgsql
435
[11716]436%endif
437
438%if %{with agent}
[7440]439%files agent
440%defattr(-,root,root,-)
441%dir %{_sysconfdir}/zabbix
442%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf
443%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_agentd
444%{_bindir}/zabbix_get
445%{_bindir}/zabbix_sender
446%{_sbindir}/zabbix_agentd
447%{_initddir}/zabbix_agentd
448%{_mandir}/man1/zabbix_get.1*
449%{_mandir}/man1/zabbix_sender.1*
450%{_mandir}/man8/zabbix_agentd.8*
451
[11716]452%endif
453
454%if %{with proxy}
[8748]455%files proxy-common
[7440]456%defattr(-,root,root,-)
457%dir %{_sysconfdir}/zabbix
458%config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf
459%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_proxy
460%{_initddir}/zabbix_proxy
461%{_mandir}/man8/zabbix_proxy.8*
[8748]462%{_datadir}/zabbix-proxy
[7440]463
[8748]464%files proxy-mysql
465%defattr(-,root,root,-)
466%{_sbindir}/zabbix_proxy.mysql
467
468%files proxy-postgresql
469%defattr(-,root,root,-)
470%{_sbindir}/zabbix_proxy.pgsql
471
[11716]472%endif
473
474%if %{with frontend}
[7440]475%files frontend-php
476%defattr(-,root,root,-)
[12073]477%license zabbix_mysql/COPYING
478%doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README
[7440]479%dir %{_datadir}/zabbix-frontend
480%{_datadir}/zabbix-frontend/php
481
[8748]482%files frontend-php-mysql
483
484%files frontend-php-postgresql
485
[11716]486%endif
487
[7440]488%changelog
[12317]489* Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.15-1
490- new upstream release.
491- imported Patch13 from upstream to support php74.
492
[12277]493* Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.13-1
494- new upstream release.
495- updated patches.
496
[12073]497* Wed May 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.7-1
498- new upstream release.
499- switched to 4.0 LTS.
500- dropped Patch0: made to get same effect by another method.
501- updated Patch1 and 2.
502
[11880]503* Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.23-1
504- new upstream release.
505
[11716]506* Tue Jun 12 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 3.0.13-2
507- accept building only agent
508
[11300]509* Thu Dec 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.13-1
510- new upstream release.
511
[11058]512* Fri Apr 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.8-1
513- new upstream release.
514
[10091]515* Fri Mar 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.1-1
516- new upstream release.
517- disabled jabber support.
518
[9746]519* Wed Sep  9 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.6-1
520- new upstream release.
521
[9497]522* Sat Apr 11 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.9-1
523- new upstream release.
524
[8748]525* Sun Jul  6 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.4-1
526- new upstream release.
527- built with both of mysql and postgresql.
528
[7879]529* Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.8-1
530- update to 2.0.8
531
532* Wed Feb 20 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.5-2
533- use %%bcond_with mysql to build with mysql
534
[7480]535* Tue Feb 19 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.5-1
536- update to 2.0.5
537- add using MySQL client library switch: default no
538  - define use_postfix and use_mysql
539  - add BuildRequires: MySQL-devel
540  - add configure option: --with-mysql
541
[7440]542* Thu Feb  7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1
543- initial build for Vine Linux
Note: See TracBrowser for help on using the repository browser.