|
@@ -1,6 +1,10 @@
|
|
-%define ver 2.0.4
|
|
|
|
|
|
+%define ver 2.0.5
|
|
%define rel 1
|
|
%define rel 1
|
|
|
|
|
|
|
|
+# zabbix accept the only one database.
|
|
|
|
+%define use_postgresql 1
|
|
|
|
+%define use_mysql 0
|
|
|
|
+
|
|
Summary: The Enterprise-class Monitoring Solution for Everyone
|
|
Summary: The Enterprise-class Monitoring Solution for Everyone
|
|
Name: zabbix
|
|
Name: zabbix
|
|
Version: %{ver}
|
|
Version: %{ver}
|
|
@@ -19,7 +23,13 @@ Patch0: zabbix-2.0.4-vine_path.patch
|
|
Patch1: zabbix-2.0.4-font.patch
|
|
Patch1: zabbix-2.0.4-font.patch
|
|
Patch2: zabbix-2.0.4-config.patch
|
|
Patch2: zabbix-2.0.4-config.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|
|
|
+%if %{use_postgresql}
|
|
BuildRequires: postgresql-devel
|
|
BuildRequires: postgresql-devel
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+BuildRequires: MySQL-devel
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
BuildRequires: curl-devel
|
|
BuildRequires: curl-devel
|
|
BuildRequires: net-snmp-devel
|
|
BuildRequires: net-snmp-devel
|
|
BuildRequires: OpenIPMI-devel
|
|
BuildRequires: OpenIPMI-devel
|
|
@@ -67,7 +77,13 @@ Zabbix Proxy
|
|
Summary: Zabbix web frontend with PHP
|
|
Summary: Zabbix web frontend with PHP
|
|
Group: Applications/Internet
|
|
Group: Applications/Internet
|
|
Requires: php5
|
|
Requires: php5
|
|
|
|
+%if %{use_postgresql}
|
|
Requires: php5-pgsql
|
|
Requires: php5-pgsql
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+Requires: php5-mysql
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
Requires: TrueType-vlgothic
|
|
Requires: TrueType-vlgothic
|
|
|
|
|
|
%description frontend-php
|
|
%description frontend-php
|
|
@@ -82,7 +98,13 @@ Zabbix web frontend with PHP.
|
|
%build
|
|
%build
|
|
%configure --enable-server --enable-proxy --enable-agent --enable-ipv6 \
|
|
%configure --enable-server --enable-proxy --enable-agent --enable-ipv6 \
|
|
--sysconfdir=%{_sysconfdir}/zabbix \
|
|
--sysconfdir=%{_sysconfdir}/zabbix \
|
|
|
|
+%if %{use_postgresql}
|
|
--with-postgresql \
|
|
--with-postgresql \
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+ --with-mysql \
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
--with-libcurl \
|
|
--with-libcurl \
|
|
--with-openipmi \
|
|
--with-openipmi \
|
|
--with-net-snmp \
|
|
--with-net-snmp \
|
|
@@ -101,7 +123,13 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
|
|
# DB
|
|
# DB
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix
|
|
|
|
+%if %{use_postgresql}
|
|
%__cp -a database/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix/
|
|
%__cp -a database/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix/
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+%__cp -a database/mysql $RPM_BUILD_ROOT%{_datadir}/zabbix/
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
|
|
# init.d
|
|
# init.d
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_initddir}
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_initddir}
|
|
@@ -118,7 +146,13 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
|
## sub package
|
|
## sub package
|
|
# proxy
|
|
# proxy
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy
|
|
|
|
+%if %{use_postgresql}
|
|
ln -s %{_datadir}/zabbix/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy/
|
|
ln -s %{_datadir}/zabbix/postgresql $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy/
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+ln -s %{_datadir}/zabbix/mysql $RPM_BUILD_ROOT%{_datadir}/zabbix-proxy/
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
|
|
# frontend-php
|
|
# frontend-php
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend
|
|
%__mkdir_p $RPM_BUILD_ROOT%{_datadir}/zabbix-frontend
|
|
@@ -186,7 +220,13 @@ fi
|
|
%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name}
|
|
%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name}
|
|
%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name}
|
|
%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name}
|
|
%dir %{_datadir}/zabbix
|
|
%dir %{_datadir}/zabbix
|
|
|
|
+%if %{use_postgresql}
|
|
%{_datadir}/zabbix/postgresql
|
|
%{_datadir}/zabbix/postgresql
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+%{_datadir}/zabbix/mysql
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
|
|
%files server
|
|
%files server
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
@@ -221,7 +261,13 @@ fi
|
|
%{_initddir}/zabbix_proxy
|
|
%{_initddir}/zabbix_proxy
|
|
%{_mandir}/man8/zabbix_proxy.8*
|
|
%{_mandir}/man8/zabbix_proxy.8*
|
|
%dir %{_datadir}/zabbix-proxy
|
|
%dir %{_datadir}/zabbix-proxy
|
|
|
|
+%if %{use_postgresql}
|
|
%{_datadir}/zabbix-proxy/postgresql
|
|
%{_datadir}/zabbix-proxy/postgresql
|
|
|
|
+%else
|
|
|
|
+%if %{use_mysql}
|
|
|
|
+%{_datadir}/zabbix-proxy/mysql
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
|
|
%files frontend-php
|
|
%files frontend-php
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
@@ -230,5 +276,12 @@ fi
|
|
%{_datadir}/zabbix-frontend/php
|
|
%{_datadir}/zabbix-frontend/php
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Feb 19 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.5-1
|
|
|
|
+- update to 2.0.5
|
|
|
|
+- add using MySQL client library switch: default no
|
|
|
|
+ - define use_postfix and use_mysql
|
|
|
|
+ - add BuildRequires: MySQL-devel
|
|
|
|
+ - add configure option: --with-mysql
|
|
|
|
+
|
|
* Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1
|
|
* Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1
|
|
- initial build for Vine Linux
|
|
- initial build for Vine Linux
|