SPECS: bbclone.spec - use virtual webserver provide and apache con...

glen glen at pld-linux.org
Sun Nov 20 23:18:03 CET 2005


Author: glen                         Date: Sun Nov 20 22:18:03 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use virtual webserver provide and apache config triggers

---- Files affected:
SPECS:
   bbclone.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/bbclone.spec
diff -u SPECS/bbclone.spec:1.4 SPECS/bbclone.spec:1.5
--- SPECS/bbclone.spec:1.4	Mon Mar 21 22:09:58 2005
+++ SPECS/bbclone.spec	Sun Nov 20 23:17:55 2005
@@ -12,18 +12,18 @@
 Source2:	%{name}.txt
 Patch0:		%{name}-security.patch
 URL:		http://www.bbclone.de/
-Requires:	apache >= 1.3.33-2
+BuildRequires:	rpmbuild(macros) >= 1.226
+Requires:	webserver = apache
 Requires:	apache(mod_access)
 Requires:	apache(mod_alias)
-Requires:	php >= 4.1.0
+Requires:	php >= 3:4.1.0
+Conflicts:	apache < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_appdir		/usr/share/bbclone
 %define		_sysconfdir	/etc/bbclone
 %define		_vardir		/var/lib
-%define		_apache1dir	/etc/apache
-%define		_apache2dir	/etc/httpd
 
 %description
 BBclone is a web counter written in PHP and gives a detailed view
@@ -104,39 +104,17 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
-	ln -sf %{_sysconfdir}/apache-%{name}.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-%{name}.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
-
-%postun
-if [ "$1" = "0" ]; then
-	# apache1
-	if [ -d %{_apache1dir}/conf.d ]; 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
-fi
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.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-%{name}.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
 
 %files
 %defattr(644,root,root,755)
@@ -165,6 +143,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2005/11/20 22:17:55  glen
+- use virtual webserver provide and apache config triggers
+
 Revision 1.4  2005/03/21 21:09:58  matipl
 - rel 1, STBR
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/bbclone.spec?r1=1.4&r2=1.5&f=u




More information about the pld-cvs-commit mailing list