]>
Commit | Line | Data |
---|---|---|
36fb4a1c | 1 | |
278aacde | 2 | %define subver 3 |
36fb4a1c | 3 | Summary: Directory Server Monitoring application |
278aacde | 4 | Summary(pl.UTF-8): Aplikacja do monitorowania usług katalogowych |
36fb4a1c | 5 | Name: cnmonitor |
48f29933 | 6 | Version: 1.3 |
278aacde | 7 | Release: 0.%{subver}.1 |
36fb4a1c SP |
8 | License: GPL |
9 | Group: Applications/WWW | |
278aacde | 10 | Source0: http://downloads.sourceforge.net/cnmonitor/%{name}-%{version}-%{subver}.tgz |
48f29933 | 11 | # Source0-md5: e8db79806c5a02d000b2dbf553c4e0b4 |
36fb4a1c SP |
12 | URL: http://cnmonitor.sourceforge.net/ |
13 | BuildRequires: rpmbuild(macros) >= 1.268 | |
14 | Requires: webapps | |
15 | Requires(triggerpostun): sed >= 4.0 | |
16 | Requires: webserver(php) | |
48f29933 AZ |
17 | Requires: php-cli |
18 | Requires: php-gd | |
36fb4a1c SP |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define _webapps /etc/webapps | |
23 | %define _webapp %{name} | |
24 | %define _sysconfdir %{_webapps}/%{_webapp} | |
25 | %define _appdir %{_datadir}/%{_webapp} | |
26 | ||
27 | %description | |
28 | Directory Server Monitoring application. The idea is to monitor entire | |
29 | small to large scaled deployed directory server environments. | |
30 | ||
278aacde JB |
31 | %description -l pl.UTF-8 |
32 | CN=Monitor to aplikacja do monitorowania usług katalogowych. Celem | |
33 | jest monitorowanie całych środowisk z serwerami usług katalogowych, | |
34 | skalujących się od małych do dużych. | |
35 | ||
36fb4a1c SP |
36 | %prep |
37 | %setup -q -n %{name} | |
38 | ||
39 | cat > lighttpd.conf <<'EOF' | |
40 | alias.url += ( | |
41 | "/%{name}" => "%{_appdir}", | |
42 | ) | |
43 | EOF | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
48 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} | |
49 | ||
50 | cp -a {bin,conf,sql,www} $RPM_BUILD_ROOT%{_appdir} | |
51 | cp -a config $RPM_BUILD_ROOT%{_sysconfdir} | |
52 | cp -a conf/httpd/cnmonitor.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
53 | cp -a conf/httpd/cnmonitor.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
54 | cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
48f29933 | 55 | ln -s %{_sysconfdir}/config $RPM_BUILD_ROOT%{_appdir}/config |
36fb4a1c SP |
56 | |
57 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
58 | %webapp_register apache %{_webapp} | |
59 | ||
60 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
61 | %webapp_unregister apache %{_webapp} | |
62 | ||
63 | %triggerin -- apache < 2.2.0, apache-base | |
64 | %webapp_register httpd %{_webapp} | |
65 | ||
66 | %triggerun -- apache < 2.2.0, apache-base | |
67 | %webapp_unregister httpd %{_webapp} | |
68 | ||
69 | %triggerin -- lighttpd | |
70 | %webapp_register lighttpd %{_webapp} | |
71 | ||
72 | %triggerun -- lighttpd | |
73 | %webapp_unregister lighttpd %{_webapp} | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc doc/*.pdf | |
81 | %dir %attr(750,root,http) %{_sysconfdir} | |
82 | %dir %attr(750,root,http) %{_sysconfdir}/config | |
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,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
86 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config/*.php | |
87 | %{_appdir} |