2 %define php_min_version 5.1.1
3 Summary: Naglite3 – Nagios status monitor for a NOC or operations room
8 Group: Applications/WWW
9 Source0: https://github.com/saz/Naglite3/archive/master/%{pname}-%{version}.tar.gz
10 # Source0-md5: 5a107b76f318615e1e65e7b1b23afa44
12 Source2: lighttpd.conf
14 URL: https://github.com/saz/Naglite3
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.268
17 Requires: php(core) >= %{php_min_version}
20 Requires: webserver(access)
21 Requires: webserver(alias)
22 Requires: webserver(php)
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _webapps /etc/webapps
27 %define _webapp %{pname}
28 %define _sysconfdir %{_webapps}/%{_webapp}
29 %define _appdir %{_datadir}/%{_webapp}
32 Full screen Nagios status monitor. Fits nicely in your NOC or
33 operations room. Inspired by Naglite and Naglite2.
38 mv config.php{.example,}
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
44 cp -p index.php *.css $RPM_BUILD_ROOT%{_appdir}
45 cp -p config.php $RPM_BUILD_ROOT%{_sysconfdir}
46 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}
48 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
49 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
50 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
53 rm -rf $RPM_BUILD_ROOT
55 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
56 %webapp_register apache %{_webapp}
58 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
59 %webapp_unregister apache %{_webapp}
61 %triggerin -- apache < 2.2.0, apache-base
62 %webapp_register httpd %{_webapp}
64 %triggerun -- apache < 2.2.0, apache-base
65 %webapp_unregister httpd %{_webapp}
67 %triggerin -- lighttpd
68 %webapp_register lighttpd %{_webapp}
70 %triggerun -- lighttpd
71 %webapp_unregister lighttpd %{_webapp}
74 %defattr(644,root,root,755)
75 %dir %attr(750,root,http) %{_sysconfdir}
76 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
77 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
78 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
79 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php