2 # - install dir - subpackage? how about doc? sql? ENABLE_INSTALLER?
5 Summary: Web based administration tool for Nagios
10 Group: Networking/Utilities
11 Source0: http://dl.sourceforge.net/nagiosql/%{name}%{ver}.tar.bz2
12 # Source0-md5: 32644a4ac38e94714d39af63456cb7a0
13 Source1: %{name}-apache.conf
15 Source3: %{name}-httpd.conf
16 Patch0: %{name}-paths.patch
17 URL: http://www.nagiosql.org/
19 Requires: php(gettext)
22 Requires: php-pear-HTML_Template_IT
24 Requires: webserver(php) >= 4.3
25 Conflicts: apache-base < 2.4.0-1
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _appdir %{_datadir}/%{name}
30 %define _webapps /etc/webapps
31 %define _webapp %{name}
32 %define _webconfdir %{_webapps}/%{_webapp}
35 NagiosQL is a web based administration tool for Nagios 2 and Nagios 3.
36 It helps you to easily build a complex configuration with all options,
37 manage and use them. NagiosQL is based on a webserver with PHP, MySQL
38 and local file or remote access to the Nagios configuration files.
43 sed -i -e 's,\r$,,' install/sql/nagiosQL_v3_db_mysql.sql
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}/nagios,%{_sysconfdir}/%{name}/{,backup/}{hosts,services},%{_webconfdir}}
50 cp -a admin functions images install templates *.php *.ico $RPM_BUILD_ROOT%{_appdir}
51 cp -a config $RPM_BUILD_ROOT%{_webconfdir}
52 ln -sf %{_webconfdir}/config $RPM_BUILD_ROOT%{_appdir}
54 install %{SOURCE1} $RPM_BUILD_ROOT%{_webconfdir}/apache.conf
55 install %{SOURCE3} $RPM_BUILD_ROOT%{_webconfdir}/httpd.conf
56 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nagios
58 %triggerin -- apache1 < 1.3.37-3, apache1-base
59 %webapp_register apache %{_webapp}
61 %triggerun -- apache1 < 1.3.37-3, apache1-base
62 %webapp_unregister apache %{_webapp}
64 %triggerin -- apache-base
65 %webapp_register httpd %{_webapp}
67 %triggerun -- apache-base
68 %webapp_unregister httpd %{_webapp}
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 %{_sysconfdir}/nagios/*
77 %attr(2770,root,nagios-data) %{_sysconfdir}/%{name}
78 %dir %attr(750,root,http) %{_webconfdir}
79 # g+w required for install-time database configuration only
80 %dir %attr(1770,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webconfdir}/config
81 %dir %{_webconfdir}/config/locale
82 %lang(de) %{_webconfdir}/config/locale/de_DE
83 %lang(en) %{_webconfdir}/config/locale/en_GB
84 %lang(es) %{_webconfdir}/config/locale/es_ES
85 %lang(fr) %{_webconfdir}/config/locale/fr_FR
86 %lang(it) %{_webconfdir}/config/locale/it_IT
87 %lang(pl) %{_webconfdir}/config/locale/pl_PL
88 %lang(ru) %{_webconfdir}/config/locale/ru_RU
89 %lang(zh) %{_webconfdir}/config/locale/zh_CN
90 %{_webconfdir}/config/*.css
91 %{_webconfdir}/config/*.php
92 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webconfdir}/apache.conf
93 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webconfdir}/httpd.conf