]> git.pld-linux.org Git - packages/cacti.git/blobdiff - cacti.spec
- Add patch from date 2010/07/27 more info http://www.cacti.net/download_patches.php
[packages/cacti.git] / cacti.spec
index 5bbdd50c111774c1e17452007eaf06034141428f..7e5451f193ea820ad5de589fa30b092321a25ecf 100644 (file)
@@ -1,21 +1,26 @@
+#
+# Conditional build:
+%bcond_without pa              # without plugin archidecture patch
+
 %include       /usr/lib/rpm/macros.perl
 Summary:       Cacti is a PHP frontend for rrdtool
 Summary(pl.UTF-8):     Cacti - frontend w PHP do rrdtoola
 Name:          cacti
-Version:       0.8.7d
-Release:       0.2
+Version:       0.8.7g
+Release:       2
 License:       GPL
 Group:         Applications/WWW
 Source0:       http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: 0822068bfa547278e94d3143ef9279e0
+# Source0-md5: 268421cb1a58d3444f7ecbddb4c4b016
 Source1:       %{name}.cfg.php
 Source2:       %{name}.crontab
 Source3:       %{name}-apache.conf
 Source4:       %{name}-lighttpd.conf
 Source5:       %{name}-rrdpath.sql
-Source5:       %{name}-rrdpath.sql
 Source6:       %{name}-pa.sql
-Patch0:                cacti-plugin-%{version}-PA-v2.4.diff
+# http://cactiusers.org/wiki/PluginArchitectureInstall
+# http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7g-PA-v2.8.tar.gz
+Patch0:                %{name}-PA.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-adodb.patch
 Patch3:                %{name}-ioerror.patch
@@ -23,7 +28,17 @@ Patch4:              %{name}-webroot.patch
 Patch5:                %{name}-linux_memory.patch
 Patch6:                %{name}-log-verbosity.patch
 Patch7:                %{name}-ss_disk-array-indices.patch
-Patch8:                %{name}-rrdresourcecheck.patch
+Patch8:                host_name-url.patch
+Patch9:                cli-relpath.patch
+# http://www.cacti.net/download_patches.php
+Patch10:       data_source_deactivate.patch
+Patch11:       graph_list_view.patch
+Patch12:       html_output.patch
+Patch13:       ldap_group_authenication.patch
+Patch14:       script_server_command_line_parse.patch
+Patch15:       ping.patch
+Patch16:       poller_interval.patch
+
 URL:           http://www.cacti.net/
 BuildRequires: rpm-perlprov
 BuildRequires: sed >= 4.0
@@ -34,12 +49,13 @@ Requires:   adodb >= 4.67-1.17
 Requires:      crondaemon
 Requires:      group(http)
 Requires:      net-snmp-utils
-Requires:      php(gd)
-Requires:      php(mysql)
-Requires:      php(pcre)
-Requires:      php(snmp)
-Requires:      php(xml)
 Requires:      php-cli
+Requires:      php-common >= 4:5.2.13-10
+Requires:      php-mysql
+Requires:      php-pcre
+Requires:      php-session
+Requires:      php-snmp
+Requires:      php-xml
 Requires:      rrdtool
 Requires:      webapps
 Requires:      webserver
@@ -48,6 +64,7 @@ Requires:     webserver(alias)
 Requires:      webserver(indexfile)
 Requires:      webserver(php)
 Suggests:      cacti-spine
+Suggests:      php-gd
 Provides:      user(cacti)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -108,7 +125,15 @@ Dokumentacja do Cacti w formacie HTML.
 
 %prep
 %setup -q
-%patch0 -p1
+%{?with_pa:%patch0 -p1}
+%patch10 -p1 
+%patch11 -p1 
+%patch12 -p1 
+%patch13 -p1 
+%patch14 -p1 
+%patch15 -p1 
+%patch16 -p1 
+
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
@@ -117,6 +142,7 @@ Dokumentacja do Cacti w formacie HTML.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 mkdir -p sql
 mv *.sql sql
@@ -129,15 +155,26 @@ rm -rf lib/adodb
 rm -f log/.htaccess
 rm -f cli/.htaccess
 rm -f rra/.placeholder
+rm -f rra/.htaccess
+
+# must require libs to get fatals on missing files, not include
+%{__sed} -i -e '
+       s,include(dirname(__FILE__)."/../include/global.php");,require(dirname(__FILE__)."/../include/global.php");,
+       s,include_once,require_once,
+' cli/*.php
 
-%{__sed} -i -e '1i#!%{_bindir}/php' scripts/*.php
-chmod a+rx scripts/*
+# make sure scripts have php shebang
+%{__sed} -i -e '1{
+    /bin.php/!i#!%{_bindir}/php
+}' scripts/*.php  cli/*.php
 
-%{__sed} -i -e '1i#!%{_bindir}/php' cli/*.php
-chmod a+rx cli/*
+chmod a+rx scripts/*.php cli/*.php
 
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
+# make sure cacti runs out of the box
+sed -e "s,new_install,%{version}," -i sql/cacti.sql
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_appdir}/{docs,plugins},/etc/cron.d,%{_sbindir}}
@@ -200,7 +237,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc docs/CHANGELOG docs/CONTRIB docs/README docs/text/manual.txt
+%doc docs/CHANGELOG docs/CONTRIB docs/README docs/txt/manual.txt
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
This page took 0.040219 seconds and 4 git commands to generate.