]>
Commit | Line | Data |
---|---|---|
d1e67b3c ER |
1 | # TODO |
2 | # - config file, patches, package for not cacti plugin | |
e3a5c1a2 | 3 | # - system vera ttf fonts, jquery |
62fd7011 | 4 | %define plugin weathermap |
e3a5c1a2 | 5 | %define php_min_version 5.2.0 |
46950fe9 | 6 | Summary: Plugin for Cacti - WeatherMap |
a90dd0d3 | 7 | Summary(pl.UTF-8): Wtyczka do Cacti - WeatherMap (mapa pogody) |
46950fe9 | 8 | Name: cacti-plugin-weathermap |
e3a5c1a2 ER |
9 | Version: 0.97a |
10 | Release: 0.1 | |
46950fe9 MWP |
11 | License: GPL v2 |
12 | Group: Applications/WWW | |
62fd7011 | 13 | Source0: http://www.network-weathermap.com/files/php-%{plugin}-%{version}.zip |
e3a5c1a2 ER |
14 | # Source0-md5: 7eb70243fef163721423b3e87d7e84b4 |
15 | URL: http://www.network-weathermap.com/ | |
46950fe9 | 16 | BuildRequires: rpm-perlprov |
e3a5c1a2 ER |
17 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 |
18 | BuildRequires: rpmbuild(macros) >= 1.554 | |
19 | BuildRequires: sed >= 4.0 | |
aacc25f9 | 20 | BuildRequires: unzip |
46950fe9 | 21 | Requires: cacti |
2ada2920 ER |
22 | Requires: php(core) >= %{php_min_version} |
23 | Requires: php(date) | |
24 | Requires: php(gd) | |
25 | Requires: php(mysql) | |
26 | Requires: php(pcre) | |
46950fe9 MWP |
27 | BuildArch: noarch |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
62fd7011 ER |
30 | %define cactidir /usr/share/cacti |
31 | %define plugindir %{cactidir}/plugins/%{plugin} | |
46950fe9 | 32 | |
e3a5c1a2 ER |
33 | # provided by package itself |
34 | %define _noautopear pear(HTML_ImageMap.class.php) pear(Weathermap.class.php) pear(editor-config.php) pear(editor.inc.php) | |
35 | ||
36 | # put it together for rpmbuild | |
37 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
38 | ||
46950fe9 | 39 | %description |
a90dd0d3 JB |
40 | Weathermap plugin for Cacti is a network visualisation tool, to take |
41 | data you already have and show you an overview of your network in map | |
42 | form. | |
d1e67b3c | 43 | |
46950fe9 MWP |
44 | Support is built in for RRD, MRTG (RRD and old log-format), and |
45 | tab-delimited text files. Other sources are via plugins or external | |
46 | scripts. | |
47 | ||
48 | %description -l pl.UTF-8 | |
a90dd0d3 JB |
49 | Wtyczka Weathermap dla Cacti to narzędzie do wizualizacji sieci, |
50 | pobierające już istniejące dane i tworzące widok sieci w postaci mapy. | |
51 | ||
52 | Ma wbudowaną obsługę plików RRD, MRTG (RRD i starego formatu logów) | |
53 | oraz tekstowych rozdzielonych tabulacjami. Inne źródła są dostępne | |
54 | przez wtyczki lub zewnętrzne skrypty. | |
46950fe9 MWP |
55 | |
56 | %prep | |
e3a5c1a2 | 57 | %setup -qc |
46950fe9 | 58 | |
e3a5c1a2 | 59 | %undos -f php,inc |
46950fe9 | 60 | |
e42d07e4 | 61 | # fix php path |
e3a5c1a2 ER |
62 | %{__sed} -i -e '1s,#!.*bin/php,#!%{_bindir}/php,' %{plugin}/%{plugin} |
63 | ||
64 | mv %{plugin}/editor-config.php{-dist,} | |
65 | ||
66 | # in docs | |
67 | mv %{plugin}/{CHANGES,COPYING,README} . | |
68 | mv %{plugin}/docs . | |
69 | ||
70 | # junk not neccessary for plugin run | |
71 | mv %{plugin}/random-bits . | |
72 | mv %{plugin}/net-data.txt . | |
73 | mv %{plugin}/convert-to-dsstats.php . | |
74 | rm -rf %{plugin}/output | |
e42d07e4 | 75 | |
46950fe9 MWP |
76 | %install |
77 | rm -rf $RPM_BUILD_ROOT | |
e3a5c1a2 ER |
78 | install -d $RPM_BUILD_ROOT%{plugindir}/output |
79 | cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir} | |
46950fe9 MWP |
80 | |
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc README CHANGES | |
62fd7011 | 87 | %{plugindir} |