]> git.pld-linux.org Git - SPECS.git/blob - nagios-naglite.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / nagios-naglite.spec
1 %define         pname   naglite
2 %define         php_min_version 5.1.1
3 Summary:        Naglite3 – Nagios status monitor for a NOC or operations room
4 Name:           nagios-%{pname}
5 Version:        1.6
6 Release:        5
7 License:        GPL
8 Group:          Applications/WWW
9 Source0:        https://github.com/saz/Naglite3/archive/master/%{pname}-%{version}.tar.gz
10 # Source0-md5:  5a107b76f318615e1e65e7b1b23afa44
11 Source1:        apache.conf
12 Source2:        lighttpd.conf
13 Patch0:         paths.patch
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}
18 Requires:       php(date)
19 Requires:       webapps
20 Requires:       webserver(access)
21 Requires:       webserver(alias)
22 Requires:       webserver(php)
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _webapps        /etc/webapps
27 %define         _webapp         %{pname}
28 %define         _sysconfdir     %{_webapps}/%{_webapp}
29 %define         _appdir         %{_datadir}/%{_webapp}
30
31 %description
32 Full screen Nagios status monitor. Fits nicely in your NOC or
33 operations room. Inspired by Naglite and Naglite2.
34
35 %prep
36 %setup -qc
37 mv Naglite3-*/* .
38 mv config.php{.example,}
39 %patch0 -p1
40
41 %install
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}
47
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
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
56 %webapp_register apache %{_webapp}
57
58 %triggerin -- apache1 < 1.3.37-3, apache1-base >= 1.3.37-3
59 %webapp_unregister apache %{_webapp}
60
61 %triggerin -- apache < 2.2.0, apache-base
62 %webapp_register httpd %{_webapp}
63
64 %triggerun -- apache < 2.2.0, apache-base
65 %webapp_unregister httpd %{_webapp}
66
67 %triggerin -- lighttpd
68 %webapp_register lighttpd %{_webapp}
69
70 %triggerun -- lighttpd
71 %webapp_unregister lighttpd %{_webapp}
72
73 %files
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
80 %{_appdir}
This page took 0.197925 seconds and 3 git commands to generate.