--- /dev/null
+--- cacti-addons-0.1/cacti/add_template.php.orig 2005-08-09 12:28:48.000000000 +0000
++++ cacti-addons-0.1/cacti/add_template.php 2007-12-25 04:37:28.000000000 +0000
+@@ -7,9 +7,8 @@
+ | Version : 0.1 8 Aug 2005 |\r
+ +---------------------------------------------------------------------------+\r
+ */\r
+-\r
+-include_once("./include/config.php");\r
+-include_once("./lib/import.php");\r
++include_once("/usr/share/cacti/include/config.php");
++include_once("/usr/share/cacti/lib/import.php");
+ \r
+ // check if we have good number of argument\r
+ if ($argc != 2 || in_array($argv[1], array('--help', '-help', '-h', '-?')))\r
+@@ -30,7 +29,7 @@
+ $xml_data = fread($fp,filesize($xml_file));\r
+ \r
+ // import data into cacti. $info_array will contain debugging info.\r
+-$info_array = import_xml_data($xml_data);\r
++$info_array = import_xml_data($xml_data,false);
+ \r
+ return 0;\r
+ ?>\r
# TODO
-# - add another (another what???)
+# - add another scripts,addons
# - patches for path to files (bin,includes)
# - %%post - add template to cacti
# - instead of using %{__php} macro, make scripts executable with #!/usr/bin/php !
Summary(pl.UTF-8): Dodatki do Cacti
Name: cacti-addons
Version: 0.1
-Release: 0.2
+Release: 0.3
License: GPL v2
Group: Applications/WWW
#Show locked Machines, Shares and Files from a Samba Server - http://forums.cacti.net/about7516.html
#URL: http://www.pawelko.net/Cacti/3-Hddtemp-Template-For-Cacti
Source6: http://www.pawelko.net/xmedia/cacti/cacti-linux-hddtemp-1.0.tar.gz
# Source6-md5: d08898b43978ccbd863076c4b3124987
+# MySQL Host Template - http://www.faemalia.net/mysqlUtils/ , http://forums.cacti.net/viewtopic.php?t=11010
+Source7: http://www.faemalia.net/mysqlUtils/teMySQLcacti-20060810.tar.gz
+# Source5-md5:
+Patch0: %{name}-add_template.patch
URL: http://www.debianhelp.co.uk/cactitemplates.htm
BuildRequires: rpm-perlprov
BuildRequires: rpmbuild(macros) >= 1.322
%prep
%setup -q -c -a3 -a6
gzip -dNc %{SOURCE1} > ./ss_poller.php
+%patch0 -p1
+# undos the source
+find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
%install
rm -rf $RPM_BUILD_ROOT