]> git.pld-linux.org Git - packages/cnmonitor.git/blob - cnmonitor.spec
- unified sf URL
[packages/cnmonitor.git] / cnmonitor.spec
1
2 %define         subver  3
3 Summary:        Directory Server Monitoring application
4 Summary(pl.UTF-8):      Aplikacja do monitorowania usług katalogowych
5 Name:           cnmonitor
6 Version:        1.3
7 Release:        0.%{subver}.1
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://downloads.sourceforge.net/cnmonitor/%{name}-%{version}-%{subver}.tgz
11 # Source0-md5:  e8db79806c5a02d000b2dbf553c4e0b4
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)
17 Requires:       php-cli
18 Requires:       php-gd
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
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
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
55 ln -s %{_sysconfdir}/config $RPM_BUILD_ROOT%{_appdir}/config
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}
This page took 0.06948 seconds and 3 git commands to generate.