]> git.pld-linux.org Git - SPECS.git/blob - nagiosql.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / nagiosql.spec
1 # TODO:
2 # - install dir - subpackage? how about doc? sql? ENABLE_INSTALLER?
3 #
4 %define         ver     304
5 Summary:        Web based administration tool for Nagios
6 Name:           nagiosql
7 Version:        3.0.4
8 Release:        2
9 License:        BSD
10 Group:          Networking/Utilities
11 Source0:        http://dl.sourceforge.net/nagiosql/%{name}%{ver}.tar.bz2
12 # Source0-md5:  32644a4ac38e94714d39af63456cb7a0
13 Source1:        %{name}-apache.conf
14 Source2:        %{name}.cfg
15 Source3:        %{name}-httpd.conf
16 Patch0:         %{name}-paths.patch
17 URL:            http://www.nagiosql.org/
18 Requires:       php(ftp)
19 Requires:       php(gettext)
20 Requires:       php(mysql)
21 Requires:       php(xml)
22 Requires:       php-pear-HTML_Template_IT
23 Requires:       webapps
24 Requires:       webserver(php) >= 4.3
25 Conflicts:      apache-base < 2.4.0-1
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _appdir         %{_datadir}/%{name}
30 %define         _webapps        /etc/webapps
31 %define         _webapp         %{name}
32 %define         _webconfdir     %{_webapps}/%{_webapp}
33
34 %description
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.
39
40 %prep
41 %setup -q -c
42 #-n %{name}
43 sed -i -e 's,\r$,,' install/sql/nagiosQL_v3_db_mysql.sql
44 %patch0 -p1
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}/nagios,%{_sysconfdir}/%{name}/{,backup/}{hosts,services},%{_webconfdir}}
49
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}
53
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
57
58 %triggerin -- apache1 < 1.3.37-3, apache1-base
59 %webapp_register apache %{_webapp}
60
61 %triggerun -- apache1 < 1.3.37-3, apache1-base
62 %webapp_unregister apache %{_webapp}
63
64 %triggerin -- apache-base
65 %webapp_register httpd %{_webapp}
66
67 %triggerun -- apache-base
68 %webapp_unregister httpd %{_webapp}
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc install/doc/*
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
94 %{_appdir}
This page took 0.133692 seconds and 3 git commands to generate.