SPECS: nagios-fruity.spec - use webapps

glen glen at pld-linux.org
Wed Dec 28 07:52:40 CET 2005


Author: glen                         Date: Wed Dec 28 06:52:40 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use webapps

---- Files affected:
SPECS:
   nagios-fruity.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/nagios-fruity.spec
diff -u SPECS/nagios-fruity.spec:1.9 SPECS/nagios-fruity.spec:1.10
--- SPECS/nagios-fruity.spec:1.9	Fri Nov  4 15:24:16 2005
+++ SPECS/nagios-fruity.spec	Wed Dec 28 07:52:33 2005
@@ -5,7 +5,7 @@
 Version:	1.0
 %define		_beta beta2
 %define		_rc pl1
-%define		_rel 1
+%define		_rel 1.1
 Release:	0.%{_beta}.%{_rc}.%{_rel}
 License:	GPL v2
 Group:		Applications/WWW
@@ -19,12 +19,14 @@
 Requires:	php >= 4:5.0.0
 Requires:	php-mysql
 Requires:	php-pear-HTML_TreeMenu
-Requires:	webserver = apache
+Requires:	webapps
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_sysconfdir /etc/fruity
-%define		_appdir %{_datadir}/fruity
+%define		_webapps	/etc/webapps
+%define		_webapp		fruity
+%define		_sysconfdir	%{_webapps}/%{_webapp}
+%define		_appdir		%{_datadir}/%{_webapp}
 
 %description
 A Nagios Configuration Tool.
@@ -42,22 +44,23 @@
 
 mv includes/config.inc{,.dist}
 
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
-
-cp -a *.php *.js $RPM_BUILD_ROOT%{_appdir}
-cp -a images includes modules output sitedb style $RPM_BUILD_ROOT%{_appdir}
-
-cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cat <<EOF > apache.conf
 Alias /fruity %{_appdir}
 <Location /fruity>
 	allow from all
 	php_value short_open_tag on
 </Location>
-# vim: filetype=apache ts=4 sw=4 et
 EOF
 
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
+
+cp -a *.php *.js $RPM_BUILD_ROOT%{_appdir}
+cp -a images includes modules output sitedb style $RPM_BUILD_ROOT%{_appdir}
+cp apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+
 sed -e "
 s,%{_prefix}/local/groundwork/fruity/logos,%{_datadir}/nagios/images/logos,
 s,%{_prefix}/local/groundwork/fruity,%{_datadir}/fruity,
@@ -82,23 +85,24 @@
 EOF
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
+%webapp_register httpd %{_webapp}
 
 %triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%webapp_unregister httpd %{_webapp}
 
 %files
 %defattr(644,root,root,755)
 %doc INSTALL sqldata/*
 %attr(750,root,http) %dir %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fruity.php
 %{_appdir}
 
@@ -108,6 +112,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2005/12/28 06:52:33  glen
+- use webapps
+
 Revision 1.9  2005/11/04 14:24:16  glen
 - fix php epoch
 - requires Nagios v2.0beta4
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/nagios-fruity.spec?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list