]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - cacti-template.spec
- make sure that produced rpms have the correct names
[projects/template-specs.git] / cacti-template.spec
index ea06c37e44498cf3ca078fbc60e71b10b0cab50d..955bf2889ef9b2c07356d8b9e08abe634537e9eb 100644 (file)
@@ -1,15 +1,23 @@
+# NOTE: existing plugins http://forums.cacti.net/viewtopic.php?t=14985
+# NOTE: existing templates http://forums.cacti.net/viewtopic.php?p=161928
 %define                template TEMPLATE_NAME
+%define                php_min_version 5.0.0
+%include       /usr/lib/rpm/macros.php
 Summary:       Template for Cacti -
 Name:          cacti-template-%{template}
 Version:       0.1
 Release:       0.1
 License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://mirror.cactiusers.org/downloads/templates/%{namesrc}-%{version}.zip
+Source0:       http://mirror.cactiusers.org/downloads/templates/%{template}-%{version}.zip
 # Source0-md5:
-URL:           http://www.cactiusers.org/
+URL:           http://docs.cacti.net/plugin:TEMPLATE_NAME
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.554
+# for %%undos macro
+BuildRequires: rpmbuild(macros) >= 1.553
 Requires:      cacti >= 0.8.7e-8
+Requires:      php-common >= 4:%{php_min_version}
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -24,11 +32,11 @@ Template for Cacti -
 #Wtyczka do Cacti -
 
 %prep
-%setup -q -c
+%setup -qc
 %setup -q -n cacti-%{template}-%{version}
+mv %{plugin}/{LICENSE,README} .
 
-# undos the source
-find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
+%undos -f php,inc
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.03745 seconds and 4 git commands to generate.