3 Summary: Directory Server Monitoring application
6 Release: 0.%{_subver}.1
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
14 Requires(triggerpostun): sed >= 4.0
15 Requires: webserver(php)
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _webapps /etc/webapps
20 %define _webapp %{name}
21 %define _sysconfdir %{_webapps}/%{_webapp}
22 %define _appdir %{_datadir}/%{_webapp}
25 Directory Server Monitoring application. The idea is to monitor entire
26 small to large scaled deployed directory server environments.
31 cat > lighttpd.conf <<'EOF'
33 "/%{name}" => "%{_appdir}",
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{_sysconfdir}
40 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
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
49 %triggerin -- apache1 < 1.3.37-3, apache1-base
50 %webapp_register apache %{_webapp}
52 %triggerun -- apache1 < 1.3.37-3, apache1-base
53 %webapp_unregister apache %{_webapp}
55 %triggerin -- apache < 2.2.0, apache-base
56 %webapp_register httpd %{_webapp}
58 %triggerun -- apache < 2.2.0, apache-base
59 %webapp_unregister httpd %{_webapp}
61 %triggerin -- lighttpd
62 %webapp_register lighttpd %{_webapp}
64 %triggerun -- lighttpd
65 %webapp_unregister lighttpd %{_webapp}
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
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