packages: cacti-plugin-weathermap/cacti-plugin-weathermap.spec - up to 0.97...

glen glen at pld-linux.org
Thu Oct 27 22:35:27 CEST 2011


Author: glen                         Date: Thu Oct 27 20:35:27 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 0.97a, try to package this mess, nfy

---- Files affected:
packages/cacti-plugin-weathermap:
   cacti-plugin-weathermap.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec
diff -u packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec:1.8 packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec:1.9
--- packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec:1.8	Sun May 16 16:13:40 2010
+++ packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec	Thu Oct 27 22:35:22 2011
@@ -1,27 +1,44 @@
 # $Revision$, $Date$
 # TODO
 #  - config file, patches, package for not cacti plugin
+#  - system vera ttf fonts, jquery
 %define		plugin	weathermap
+%define		php_min_version 5.2.0
+%include	/usr/lib/rpm/macros.php
 %include	/usr/lib/rpm/macros.perl
 Summary:	Plugin for Cacti - WeatherMap
 Summary(pl.UTF-8):	Wtyczka do Cacti - WeatherMap (mapa pogody)
 Name:		cacti-plugin-weathermap
-Version:	0.95b
-Release:	2
+Version:	0.97a
+Release:	0.1
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://www.network-weathermap.com/files/php-%{plugin}-%{version}.zip
-# Source0-md5:	6481970ad971dfe659eed535b440e678
-URL:		http://www.network-weathermap.com
+# Source0-md5:	7eb70243fef163721423b3e87d7e84b4
+URL:		http://www.network-weathermap.com/
 BuildRequires:	rpm-perlprov
+BuildRequires:	rpm-php-pearprov >= 4.4.2-11
+BuildRequires:	rpmbuild(macros) >= 1.554
+BuildRequires:	sed >= 4.0
 BuildRequires:	unzip
 Requires:	cacti
+Requires:	php-common >= 4:%{php_min_version}
+Requires:	php-date
+Requires:	php-gd
+Requires:	php-mysql
+Requires:	php-pcre
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		cactidir		/usr/share/cacti
 %define		plugindir		%{cactidir}/plugins/%{plugin}
 
+# provided by package itself
+%define		_noautopear	pear(HTML_ImageMap.class.php) pear(Weathermap.class.php) pear(editor-config.php) pear(editor.inc.php)
+
+# put it together for rpmbuild
+%define		_noautoreq	%{?_noautophp} %{?_noautopear}
+
 %description
 Weathermap plugin for Cacti is a network visualisation tool, to take
 data you already have and show you an overview of your network in map
@@ -40,18 +57,29 @@
 przez wtyczki lub zewnętrzne skrypty.
 
 %prep
-%setup -q -n %{plugin}
+%setup -qc
 
-# undos the source
-find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
+%undos -f php,inc
 
 # fix php path
-%{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{plugin}
+%{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{plugin}/%{plugin}
+
+mv %{plugin}/editor-config.php{-dist,}
+
+# in docs
+mv %{plugin}/{CHANGES,COPYING,README} .
+mv %{plugin}/docs .
+
+# junk not neccessary for plugin run
+mv %{plugin}/random-bits .
+mv %{plugin}/net-data.txt .
+mv %{plugin}/convert-to-dsstats.php .
+rm -rf %{plugin}/output
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{plugindir}
-cp -a . $RPM_BUILD_ROOT%{plugindir}
+install -d $RPM_BUILD_ROOT%{plugindir}/output
+cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -67,6 +95,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2011/10/27 20:35:22  glen
+- up to 0.97a, try to package this mess, nfy
+
 Revision 1.8  2010/05/16 14:13:40  sparky
 - BR: unzip
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/cacti-plugin-weathermap/cacti-plugin-weathermap.spec?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list