]> git.pld-linux.org Git - packages/cnmonitor.git/blob - cnmonitor.spec
- initial
[packages/cnmonitor.git] / cnmonitor.spec
1
2 %define         _subver 4
3 Summary:        Directory Server Monitoring application
4 Name:           cnmonitor
5 Version:        1.0.1
6 Release:        0.%{_subver}.1
7 License:        GPL
8 Group:          Applications/WWW
9 Source0:        http://dl.sourceforge.net/project/cnmonitor/CN%3DMonitor/1.0.1/%{name}-%{version}-4.tgz
10 # Source0-md5:  570ad8a6f7174be21e9c92cbf6a620dd
11 URL:            http://cnmonitor.sourceforge.net/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 Requires:       webapps
14 Requires(triggerpostun):        sed >= 4.0
15 Requires:       webserver(php)
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _webapps        /etc/webapps
20 %define         _webapp         %{name}
21 %define         _sysconfdir     %{_webapps}/%{_webapp}
22 %define         _appdir         %{_datadir}/%{_webapp}
23
24 %description
25 Directory Server Monitoring application. The idea is to monitor entire
26 small to large scaled deployed directory server environments.
27
28 %prep
29 %setup -q -n %{name}
30
31 cat > lighttpd.conf <<'EOF'
32 alias.url += (
33     "/%{name}" => "%{_appdir}",
34 )
35 EOF
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{_sysconfdir}
40 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
41
42 cp -a {bin,conf,sql,www} $RPM_BUILD_ROOT%{_appdir}
43 cp -a config $RPM_BUILD_ROOT%{_sysconfdir}
44 cp -a conf/httpd/cnmonitor.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
45 cp -a conf/httpd/cnmonitor.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
46 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
47 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
48
49 %triggerin -- apache1 < 1.3.37-3, apache1-base
50 %webapp_register apache %{_webapp}
51
52 %triggerun -- apache1 < 1.3.37-3, apache1-base
53 %webapp_unregister apache %{_webapp}
54
55 %triggerin -- apache < 2.2.0, apache-base
56 %webapp_register httpd %{_webapp}
57
58 %triggerun -- apache < 2.2.0, apache-base
59 %webapp_unregister httpd %{_webapp}
60
61 %triggerin -- lighttpd
62 %webapp_register lighttpd %{_webapp}
63
64 %triggerun -- lighttpd
65 %webapp_unregister lighttpd %{_webapp}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
71 %defattr(644,root,root,755)
72 %doc doc/*.pdf
73 %dir %attr(750,root,http) %{_sysconfdir}
74 %dir %attr(750,root,http) %{_sysconfdir}/config
75 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
76 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
77 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
78 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config/*.php
79 %{_appdir}
This page took 0.080362 seconds and 3 git commands to generate.