SPECS: trac.spec - use apache config triggers - add contrib/ to %d...

glen glen at pld-linux.org
Mon Aug 15 21:08:04 CEST 2005


Author: glen                         Date: Mon Aug 15 19:08:04 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use apache config triggers
- add contrib/ to %doc
- %{py_postclean} enabled to remove .py from DESTDIR
- rel 3

---- Files affected:
SPECS:
   trac.spec (1.18 -> 1.19) 

---- Diffs:

================================================================
Index: SPECS/trac.spec
diff -u SPECS/trac.spec:1.18 SPECS/trac.spec:1.19
--- SPECS/trac.spec:1.18	Sun Jul 24 05:12:24 2005
+++ SPECS/trac.spec	Mon Aug 15 21:07:59 2005
@@ -3,7 +3,7 @@
 Summary(pl):	Zintegrowane scm, wiki, system śledzenia problemów i środowisko projektowe
 Name:		trac
 Version:	0.8.4
-Release:	2
+Release:	3
 Epoch:		0
 License:	GPL
 Group:		Applications/WWW
@@ -14,7 +14,7 @@
 Patch0:	%{name}-util.patch
 URL:		http://www.edgewall.com/trac/
 BuildRequires:	python >= 2.1
-BuildRequires:	rpmbuild(macros) >= 1.177
+BuildRequires:	rpmbuild(macros) >= 1.226
 Requires:	group(http)
 Requires:	python >= 2.1
 Requires:	python-clearsilver >= 0.9.3
@@ -27,8 +27,6 @@
 
 %define		_sysconfdir	/etc/%{name}
 %define		_datadir	%{_prefix}/share/%{name}
-%define		_apache1dir	/etc/apache
-%define		_apache2dir	/etc/httpd
 
 %description
 Trac is a minimalistic web-based software project management and
@@ -61,27 +59,24 @@
 %{py_ocomp} $RPM_BUILD_ROOT%{py_sitescriptdir}
 
 # remove .py files, leave just compiled ones.
-#%%{py_postclean}
+%{py_postclean}
 
 %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
 
@@ -99,27 +94,10 @@
 
 fi
 
-%preun
-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
-
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog INSTALL README THANKS UPGRADE
+%doc contrib/
 %dir %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 # this group makes it apache specific?
@@ -152,6 +130,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.19  2005/08/15 19:07:59  glen
+- use apache config triggers
+- add contrib/ to %doc
+- %{py_postclean} enabled to remove .py from DESTDIR
+- rel 3
+
 Revision 1.18  2005/07/24 03:12:24  aredridel
 - actually works
 - STBR
@@ -168,7 +152,7 @@
 - up to 0.8.2
 
 Revision 1.14  2005/05/30 08:14:38  radzio
- - rel 1, STBR
+- rel 1, STBR
 
 Revision 1.13  2005/05/29 22:07:16  radzio
 - fix Patch0 (compatibility with Subversion 1.2)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/trac.spec?r1=1.18&r2=1.19&f=u




More information about the pld-cvs-commit mailing list