---- cacti-0.8.7b/include/global.php~ 2008-10-05 04:29:33.131404241 +0300
-+++ cacti-0.8.7b/include/global.php 2008-10-05 04:38:29.740276226 +0300
+--- cacti-0.8.7b/include/global.php 2008-10-05 04:38:29.740276226 +0300
++++ cacti-0.8.7g/include/global.php 2010-12-13 12:10:44.312310245 +0200
+@@ -42,7 +42,7 @@
+ $cacti_session_name = "Cacti";
+
+ /* Include configuration */
+-include(dirname(__FILE__) . "/config.php");
++require '/etc/webapps/cacti/config.php';
+
+ if (isset($config["cacti_version"])) {
+ die("Invalid include/config.php file detected.");
@@ -101,7 +101,8 @@
$config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/");
$config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
/* colors */
$colors["dark_outline"] = "454E53";
-diff -ur cacti-0.8.7g/include/config.php cacti-0.8.7g.new//include/config.php
---- cacti-0.8.7g/include/config.php 2010-07-10 00:33:46.000000000 +0200
-+++ cacti-0.8.7g.new//include/config.php 2010-11-15 10:12:12.503157839 +0100
-@@ -22,7 +22,11 @@
- +-------------------------------------------------------------------------+
- */
-
--/* make sure these values refect your actual database/host/user/password */
-+/*
-+ * !!! Use /etc/webapps/cacti/config.php instead of this section !!!
-+ *
-+ * Make sure these values refect your actual database/host/user/password
-+
+--- cacti-0.8.7g/include/config.php~ 2010-12-13 12:15:08.000000000 +0200
++++ cacti-0.8.7g/include/config.php 2010-12-13 12:16:09.275611204 +0200
+@@ -26,8 +26,8 @@
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
-@@ -30,6 +34,10 @@
- $database_password = "cactiuser";
+-$database_username = "cactiuser";
+-$database_password = "cactiuser";
++$database_username = "mysql";
++$database_password = "";
$database_port = "3306";
-
-+ */
-+
-+require '/etc/webapps/cacti/config.php';
-+
+
+ /* load up old style plugins here */
+@@ -39,9 +39,7 @@
+ ex: if your cacti install as at http://serverip/cacti/ this
+ would be set to /cacti/
+ */
+-$url_path = "/";
++$url_path = '/cacti/';
+
/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";
-
+-
+-?>
--- cacti-0.8.7b/include/global_settings.php~ 2008-10-05 04:29:33.121404239 +0300
+++ cacti-0.8.7b/include/global_settings.php 2008-10-05 04:41:11.807395633 +0300
@@ -96,7 +96,7 @@
+++ /dev/null
-<?php
-$database_type = 'mysql';
-$database_default = 'cacti';
-$database_hostname = 'localhost';
-$database_username = 'mysql';
-$database_password = '';
-
-$plugins = array();
-// $plugins[] = 'thold';
-// $plugins[] = 'monitor';
-// $plugins[] = 'discovery';
-
-/* This is full URL Path to the Cacti installation
- For example, if your cacti was accessible by http://server/cacti/ you would user '/cacti/'
- as the url path. For just http://server/ use '/'
-*/
-$config['url_path'] = '/cacti/';
Summary(pl.UTF-8): Cacti - frontend w PHP do rrdtoola
Name: cacti
Version: 0.8.7g
-Release: 4
+Release: 5
License: GPL
Group: Applications/WWW
Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
# Source0-md5: 268421cb1a58d3444f7ecbddb4c4b016
-Source1: %{name}.cfg.php
Source2: %{name}.crontab
Source3: %{name}-apache.conf
Source4: %{name}-lighttpd.conf
cp -a log $RPM_BUILD_ROOT/var/log/%{name}
cp -a rra $RPM_BUILD_ROOT/var/lib/%{name}
-cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/config.php
+mv $RPM_BUILD_ROOT{%{_appdir}/include,%{_sysconfdir}}/config.php
cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
cp -a %{SOURCE7} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}