]> git.pld-linux.org Git - packages/cacti-plugin-weathermap.git/commitdiff
- simplify macros and cleanups
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 5 Oct 2008 11:18:07 +0000 (11:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cacti-plugin-weathermap.spec -> 1.7

cacti-plugin-weathermap.spec

index 7a55a76a116d9486af90356550d9616574ed059e..a2d1c8cab1698a7aeb78d718b5a729bc592644d6 100644 (file)
@@ -1,6 +1,6 @@
 # TODO
 #  - config file, patches, package for not cacti plugin
-%define                namesrc weathermap
+%define                plugin  weathermap
 %include       /usr/lib/rpm/macros.perl
 Summary:       Plugin for Cacti - WeatherMap
 Summary(pl.UTF-8):     Wtyczka do Cacti - WeatherMap (mapa pogody)
@@ -9,7 +9,7 @@ Version:        0.95b
 Release:       2
 License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://www.network-weathermap.com/files/php-%{namesrc}-%{version}.zip
+Source0:       http://www.network-weathermap.com/files/php-%{plugin}-%{version}.zip
 # Source0-md5: 6481970ad971dfe659eed535b440e678
 URL:           http://www.network-weathermap.com
 BuildRequires: rpm-perlprov
@@ -17,7 +17,8 @@ Requires:     cacti
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                webcactipluginroot /usr/share/cacti/plugins/%{namesrc}
+%define                cactidir                /usr/share/cacti
+%define                plugindir               %{cactidir}/plugins/%{plugin}
 
 %description
 Weathermap plugin for Cacti is a network visualisation tool, to take
@@ -37,18 +38,18 @@ oraz tekstowych rozdzielonych tabulacjami. Inne źródła są dostępne
 przez wtyczki lub zewnętrzne skrypty.
 
 %prep
-%setup -q -n %{namesrc}
+%setup -q -n %{plugin}
 
 # undos the source
 find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
 
 # fix php path
-%{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{namesrc}
+%{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{plugin}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{webcactipluginroot}
-cp -a . $RPM_BUILD_ROOT%{webcactipluginroot}
+install -d $RPM_BUILD_ROOT%{plugindir}
+cp -a . $RPM_BUILD_ROOT%{plugindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -56,4 +57,4 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc README CHANGES
-%{webcactipluginroot}
+%{plugindir}
This page took 0.147419 seconds and 4 git commands to generate.