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
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)
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _webapps /etc/webapps
19 %define _webapp nag2web
20 %define _sysconfdir %{_webapps}/%{_webapp}
21 %define _appdir %{_datadir}/%{_webapp}
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.
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.
36 %setup -q -n nag2web-%{version}
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}
47 install dbconfig.inc $RPM_BUILD_ROOT%{_sysconfdir}/dbconfig.php
48 ln -s %{_sysconfdir}/dbconfig.php $RPM_BUILD_ROOT%{_appdir}
50 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
51 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
54 rm -rf $RPM_BUILD_ROOT
57 if [ "$1" = "1" ]; then
58 %banner %{name} -e <<'EOF'
60 $ mysqladmin create nag2web
61 $ mysql -e "GRANT SELECT, INSERT, UPDATE, DELETE ON nag2web.* TO 'nag2web'@'localhost' IDENTIFIED BY 'nag2web'"
65 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
66 %webapp_register apache %{_webapp}
68 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
69 %webapp_unregister apache %{_webapp}
71 %triggerin -- apache < 2.2.0, apache-base
72 %webapp_register httpd %{_webapp}
74 %triggerun -- apache < 2.2.0, apache-base
75 %webapp_unregister httpd %{_webapp}
78 %defattr(644,root,root,755)
79 %doc CHANGELOG INSTALL
80 %lang(de) %doc INSTALL-DE
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