X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=cacti.spec;h=a3aa4599163a7aa95c82172cc841d399b8c9d6eb;hb=aa6fbcd1fd78149071b440355399d7da73f0be17;hp=88418362c6a2152a24576d7506d405fb62956194;hpb=68f12f8adbe16d5510623b469f9e71144a3c9b76;p=packages%2Fcacti.git diff --git a/cacti.spec b/cacti.spec index 8841836..a3aa459 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,13 +1,15 @@ %define pia_ver 3.1 +%define php_min_version 5.2.13-10 +%include /usr/lib/rpm/macros.php Summary: Cacti is a PHP frontend for rrdtool Summary(pl.UTF-8): Cacti - frontend w PHP do rrdtoola Name: cacti -Version: 0.8.8a +Version: 0.8.8f Release: 1 License: GPL v2 Group: Applications/WWW Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz -# Source0-md5: a4da682dab9a88a2e0edb1728bf531ae +# Source0-md5: 8d90642b362f80c46c489c5531e2ba90 Source2: %{name}.crontab Source3: %{name}-apache.conf Source4: %{name}-lighttpd.conf @@ -23,6 +25,7 @@ Patch6: %{name}-log-verbosity.patch Patch7: %{name}-ss_disk-array-indices.patch Patch8: host_name-url.patch # http://www.cacti.net/download_patches.php +# Patch100: .. URL: http://www.cacti.net/ BuildRequires: sed >= 4.0 Requires(postun): /usr/sbin/userdel @@ -33,7 +36,7 @@ Requires: cacti-plugin-boost >= 5.0 Requires: crondaemon Requires: group(http) Requires: net-snmp-utils -Requires: php(core) >= 5.2.13-10 +Requires: php(core) >= %{php_min_version} Requires: php(mysql) Requires: php(pcre) Requires: php(session) @@ -47,12 +50,16 @@ Requires: webserver(alias) Requires: webserver(indexfile) Requires: webserver(php) Suggests: cacti-spine +Suggests: php-bcmath +Suggests: php-ftp Suggests: php-gd Provides: cacti(pia) = %{pia_ver} Provides: user(cacti) Obsoletes: cacti-add_template Obsoletes: cacti-plugin-update +%if "%{pld_release}" != "ac" Conflicts: logrotate < 3.8.0 +%endif BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -61,6 +68,14 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir %{_webapps}/%{_webapp} %define _appdir /usr/share/%{name} +# bad depsolver +%define _noautopear pear +# optional +%define _noautophp php-ftp php-bcmath + +# put it together for rpmbuild +%define _noautoreq %{?_noautophp} %{?_noautopear} + %description Cacti is a complete frondend to rrdtool, it stores all of the nessesary information to create graphs and populate them with data in @@ -112,7 +127,11 @@ Dokumentacja do Cacti w formacie HTML. %prep %setup -q + # official patches +%if 0%{?PATCH100:1} +%patch100 -p1 +%endif %patch0 -p1 %patch1 -p1 @@ -170,6 +189,10 @@ mv $RPM_BUILD_ROOT{%{_appdir}/include,%{_sysconfdir}}/config.php cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name} cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} +%if "%{pld_release}" == "ac" +%{__sed} -i -e '/su/d' $RPM_BUILD_ROOT/etc/logrotate.d/%{name} +%endif + cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf @@ -185,13 +208,14 @@ if [ ! -f /var/log/%{name}/cacti.log ]; then install -m660 -oroot -ghttp /dev/null /var/log/%{name}/cacti.log fi -%{_appdir}/cli/upgrade_database.php || : - %postun if [ "$1" = "0" ]; then %userremove cacti fi +%post setup +%{_appdir}/cli/upgrade_database.php || : + %triggerin -- apache1 < 1.3.37-3, apache1-base %webapp_register apache %{_webapp}