SPECS: cowiki.spec - use apache config triggers; rel 2

glen glen at pld-linux.org
Tue Jul 19 15:45:24 CEST 2005


Author: glen                         Date: Tue Jul 19 13:45:24 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use apache config triggers; rel 2

---- Files affected:
SPECS:
   cowiki.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SPECS/cowiki.spec
diff -u SPECS/cowiki.spec:1.8 SPECS/cowiki.spec:1.9
--- SPECS/cowiki.spec:1.8	Sat Jun 18 12:49:07 2005
+++ SPECS/cowiki.spec	Tue Jul 19 15:45:19 2005
@@ -10,7 +10,7 @@
 %else
 %define _source http://www.cowiki.org/download/%{name}-%{version}.tar.gz
 %endif
-%define _rel 1
+%define _rel 2
 
 Summary:	Web collaboration tool
 Summary(pl):	Narzędzie do współpracy i współtworzenia w sieci
@@ -24,7 +24,7 @@
 # Source0-md5:	33d0b6506e39846666434cc3ba2f95bd
 Patch0:		%{name}-FHS.patch
 URL:		http://cowiki.org/
-BuildRequires:	rpmbuild(macros) >= 1.177
+BuildRequires:	rpmbuild(macros) >= 1.226
 Requires:	php >= 5.0.2
 Requires:	php-mysql
 Requires:	apache(mod_auth)
@@ -33,8 +33,6 @@
 
 %define		_appdir %{_datadir}/%{name}
 %define		_sysconfdir	/etc/%{name}
-%define		_apache1dir	/etc/apache
-%define		_apache2dir	/etc/httpd
 
 %description
 coWiki is a sophisticated but easy to use web collaboration tool that
@@ -96,22 +94,19 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
-	ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
-	if [ -f /var/lock/subsys/apache ]; then
-		/etc/rc.d/init.d/apache restart 1>&2
-	fi
-fi
-# apache2
-if [ -d %{_apache2dir}/httpd.conf ]; then
-	ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
-	if [ -f /var/lock/subsys/httpd ]; then
-		/etc/rc.d/init.d/httpd restart 1>&2
-	fi
-fi
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
 
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
+%post
 if [ "$1" = 1 ]; then
 %banner %{name} -e <<EOF
 Install the database using the appropriate "misc/database/*.sql" schema.
@@ -123,21 +118,6 @@
 
 %preun
 if [ "$1" = "0" ]; then
-	# apache1
-	if [ -f %{_apache1dir}/apache.conf ]; then
-		rm -f %{_apache1dir}/conf.d/99_%{name}.conf
-		if [ -f /var/lock/subsys/apache ]; then
-			/etc/rc.d/init.d/apache restart 1>&2
-		fi
-	fi
-	# apache2
-	if [ -d %{_apache2dir}/httpd.conf ]; then
-		rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
-		if [ -f /var/lock/subsys/httpd ]; then
-			/etc/rc.d/init.d/httpd restart 1>&2
-		fi
-	fi
-
 	# nuke cache
 	# FIXME could suffer too many arguments error
 	rm -f /var/lib/%{name}/*
@@ -160,6 +140,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2005/07/19 13:45:19  glen
+- use apache config triggers; rel 2
+
 Revision 1.8  2005/06/18 10:49:07  glen
 - R: apache(mod_auth)
 
================================================================

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




More information about the pld-cvs-commit mailing list