]> git.pld-linux.org Git - packages/cacti-plugin-thold.git/blobdiff - cacti-plugin-thold.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/cacti-plugin-thold.git] / cacti-plugin-thold.spec
index 7b8c73e5ee2b0e0878627b3fac1c8c9ed1db5f86..0b201797e37f40cf62adfcbea22c1b814f10405c 100644 (file)
@@ -1,19 +1,25 @@
 %define                plugin  thold
-%include       /usr/lib/rpm/macros.perl
+%define                php_min_version 5.1.1
 Summary:       Plugin for Cacti - Thold
 Summary(pl.UTF-8):     Wtyczka do Cacti - Thold
-Name:          cacti-plugin-thold
-Version:       0.3.9
+Name:          cacti-plugin-%{plugin}
+Version:       0.5.0
 Release:       1
-License:       GPL v2.1
+License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://mirror.cactiusers.org/downloads/plugins/%{plugin}-%{version}.zip
-# Source0-md5: 72de5b79cff6e6794439704188400d5e
-URL:           http://www.cactiusers.org/
-BuildRequires: rpm-perlprov
-BuildRequires: unzip
+Source0:       http://docs.cacti.net/_media/plugin:thold-v0.5.0.tgz
+# Source0-md5: c2a0f8072dd57c59f9c3608c2d6922cf
+Patch0:                %{name}-undefined_variable_subject.patch
+Patch1:                %{name}-division_by_zero.patch
+URL:           http://docs.cacti.net/plugin:thold
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
 Requires:      cacti
-Requires:      cacti-plugin-settings
+Requires:      cacti(pia) >= 2.9
+Requires:      cacti-plugin-settings >= 0.71
+Requires:      php(core) >= %{php_min_version}
+Requires:      php(gd)
+Requires:      php(pcre)
+Requires:      php(date)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -21,9 +27,11 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                plugindir               %{cactidir}/plugins/%{plugin}
 
 %description
-Plugin for Cacti - the Threshold Module (by Aurelio DeSimone)
-converted to a plugin. Much easier to install and maintain. Requires
-that you have the Plugin Architecture installed.
+This plugin is for the alerting of data found within any graph within
+Cacti.
+
+Thold is Cacti's premier Alerting modules that integrates seamlessly
+with Cacti's Graphing engine.
 
 %description -l pl.UTF-8
 Wtyczka do Cacti - moduł Threshold (który napisał Aurelio DeSimone)
@@ -34,12 +42,19 @@ przekroczenia zadanych wartości lub niekorzystnych zmian w przebiegu
 monitorowanych parametrów.
 
 %prep
-%setup -q -c
+%setup -qc
+mv %{plugin}/{LICENSE,README} .
+
+# undos the source
+find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
+
+%patch0 -p1
+%patch1 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{plugindir}
-cp -a . $RPM_BUILD_ROOT%{plugindir}
+cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.040711 seconds and 4 git commands to generate.