]> git.pld-linux.org Git - SPECS.git/blob - nagios-nag2web.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / nagios-nag2web.spec
1 Summary:        PHP/MySQL web front-end for Nagios 2.x
2 Summary(pl.UTF-8):      Oparty na PHP/MySQL interfejs WWW dla Nagiosa 2.x
3 Name:           nagios-nag2web
4 Version:        1.5.3
5 Release:        0.4
6 License:        GPL v2
7 Group:          Applications/WWW
8 Source0:        http://dl.sourceforge.net/nag2web/nag2web-%{version}.tar.gz
9 # Source0-md5:  7aab78eb1d1547914166ba42f5e10660
10 Source1:        nag2web-apache.conf
11 Patch0:         nag2web-fixes.patch
12 Patch1:         nag2web-config.patch
13 URL:            http://www.nag2web.de/
14 Requires:       webserver(php)
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _webapps        /etc/webapps
19 %define         _webapp         nag2web
20 %define         _sysconfdir     %{_webapps}/%{_webapp}
21 %define         _appdir         %{_datadir}/%{_webapp}
22
23 %description
24 A PHP/MySQL web front-end for Nagios 2.x setup. With the ability to
25 add/remove/edit the config items. The web front-end for Nagios has the
26 ability to test the config. We want to build a simple possibility to
27 find and show all the features in Nagios.
28
29 %description -l pl.UTF-8
30 Oparty na PHP/MySQL interfejs WWW do konfiguracji Nagiosa 2.x. Ma
31 możliwość dodawania/usuwania/modyfikowania elementów konfiguracji oraz
32 testowania konfiguracji. Celem projektu jest umożliwienie łatwego
33 znalezienia i pokazania wszystkich możliwości Nagiosa.
34
35 %prep
36 %setup -q -n nag2web-%{version}
37 mv dbconfig.{php,inc}
38 %patch0 -p1
39 %patch1 -p1
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
44 cp -a *.php *.css $RPM_BUILD_ROOT%{_appdir}
45 cp -a help images lang $RPM_BUILD_ROOT%{_appdir}
46
47 install dbconfig.inc $RPM_BUILD_ROOT%{_sysconfdir}/dbconfig.php
48 ln -s %{_sysconfdir}/dbconfig.php $RPM_BUILD_ROOT%{_appdir}
49
50 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
51 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 if [ "$1" = "1" ]; then
58 %banner %{name} -e <<'EOF'
59 Quickstart:
60 $ mysqladmin create nag2web
61 $ mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON nag2web.* TO 'nag2web'@'localhost' IDENTIFIED BY 'nag2web'"
62 EOF
63 fi
64
65 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
66 %webapp_register apache %{_webapp}
67
68 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
69 %webapp_unregister apache %{_webapp}
70
71 %triggerin -- apache < 2.2.0, apache-base
72 %webapp_register httpd %{_webapp}
73
74 %triggerun -- apache < 2.2.0, apache-base
75 %webapp_unregister httpd %{_webapp}
76
77 %files
78 %defattr(644,root,root,755)
79 %doc CHANGELOG INSTALL
80 %lang(de) %doc INSTALL-DE
81 %doc sql
82 %dir %attr(750,root,http) %{_sysconfdir}
83 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
84 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
85 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
86 %{_appdir}
This page took 0.338888 seconds and 3 git commands to generate.