2 # - config file, patches, package for not cacti plugin
3 # - system vera ttf fonts, jquery
4 %define plugin weathermap
5 %define php_min_version 5.2.0
6 %include /usr/lib/rpm/macros.php
7 %include /usr/lib/rpm/macros.perl
8 Summary: Plugin for Cacti - WeatherMap
9 Summary(pl.UTF-8): Wtyczka do Cacti - WeatherMap (mapa pogody)
10 Name: cacti-plugin-weathermap
14 Group: Applications/WWW
15 Source0: http://www.network-weathermap.com/files/php-%{plugin}-%{version}.zip
16 # Source0-md5: 7eb70243fef163721423b3e87d7e84b4
17 URL: http://www.network-weathermap.com/
18 BuildRequires: rpm-perlprov
19 BuildRequires: rpm-php-pearprov >= 4.4.2-11
20 BuildRequires: rpmbuild(macros) >= 1.554
21 BuildRequires: sed >= 4.0
24 Requires: php(core) >= %{php_min_version}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define cactidir /usr/share/cacti
33 %define plugindir %{cactidir}/plugins/%{plugin}
35 # provided by package itself
36 %define _noautopear pear(HTML_ImageMap.class.php) pear(Weathermap.class.php) pear(editor-config.php) pear(editor.inc.php)
38 # put it together for rpmbuild
39 %define _noautoreq %{?_noautophp} %{?_noautopear}
42 Weathermap plugin for Cacti is a network visualisation tool, to take
43 data you already have and show you an overview of your network in map
46 Support is built in for RRD, MRTG (RRD and old log-format), and
47 tab-delimited text files. Other sources are via plugins or external
50 %description -l pl.UTF-8
51 Wtyczka Weathermap dla Cacti to narzędzie do wizualizacji sieci,
52 pobierające już istniejące dane i tworzące widok sieci w postaci mapy.
54 Ma wbudowaną obsługę plików RRD, MRTG (RRD i starego formatu logów)
55 oraz tekstowych rozdzielonych tabulacjami. Inne źródła są dostępne
56 przez wtyczki lub zewnętrzne skrypty.
64 %{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{plugin}/%{plugin}
66 mv %{plugin}/editor-config.php{-dist,}
69 mv %{plugin}/{CHANGES,COPYING,README} .
72 # junk not neccessary for plugin run
73 mv %{plugin}/random-bits .
74 mv %{plugin}/net-data.txt .
75 mv %{plugin}/convert-to-dsstats.php .
76 rm -rf %{plugin}/output
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{plugindir}/output
81 cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir}
84 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)