]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
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 | Summary: Plugin for Cacti - WeatherMap | |
7 | Summary(pl.UTF-8): Wtyczka do Cacti - WeatherMap (mapa pogody) | |
8 | Name: cacti-plugin-weathermap | |
9 | Version: 0.97a | |
10 | Release: 0.1 | |
11 | License: GPL v2 | |
12 | Group: Applications/WWW | |
13 | Source0: http://www.network-weathermap.com/files/php-%{plugin}-%{version}.zip | |
14 | # Source0-md5: 7eb70243fef163721423b3e87d7e84b4 | |
15 | URL: http://www.network-weathermap.com/ | |
16 | BuildRequires: rpm-perlprov | |
17 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
18 | BuildRequires: rpmbuild(macros) >= 1.554 | |
19 | BuildRequires: sed >= 4.0 | |
20 | BuildRequires: unzip | |
21 | Requires: cacti | |
22 | Requires: php(core) >= %{php_min_version} | |
23 | Requires: php(date) | |
24 | Requires: php(gd) | |
25 | Requires: php(mysql) | |
26 | Requires: php(pcre) | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %define cactidir /usr/share/cacti | |
31 | %define plugindir %{cactidir}/plugins/%{plugin} | |
32 | ||
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 | ||
39 | %description | |
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. | |
43 | ||
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 | |
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. | |
55 | ||
56 | %prep | |
57 | %setup -qc | |
58 | ||
59 | %undos -f php,inc | |
60 | ||
61 | # fix php path | |
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 | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | install -d $RPM_BUILD_ROOT%{plugindir}/output | |
79 | cp -a %{plugin}/* $RPM_BUILD_ROOT%{plugindir} | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc README CHANGES | |
87 | %{plugindir} |