SPECS: template-webapp.spec - spec more to the real life for easie...

glen glen at pld-linux.org
Sat Dec 3 22:09:34 CET 2005


Author: glen                         Date: Sat Dec  3 21:09:34 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- spec more to the real life for easier copy paste

---- Files affected:
SPECS:
   template-webapp.spec (1.30 -> 1.31) 

---- Diffs:

================================================================
Index: SPECS/template-webapp.spec
diff -u SPECS/template-webapp.spec:1.30 SPECS/template-webapp.spec:1.31
--- SPECS/template-webapp.spec:1.30	Wed Nov 30 21:20:39 2005
+++ SPECS/template-webapp.spec	Sat Dec  3 22:09:28 2005
@@ -18,7 +18,7 @@
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_webapps	/etc/webapps
-%define		_webapp		sample-webapp
+%define		_webapp		%{name}
 %define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
@@ -43,6 +43,11 @@
 install config.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 install config.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
 
+# in case %{_sysconfdir} is %{_webapps}/%{_webapp}
+install config.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install config.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+install config.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
+
 # %webapp_* macros usage extracted from /usr/lib/rpm/macros.build:
 #
 # Usage:
@@ -70,6 +75,15 @@
 %if 00000000000000000000000000000000000
 # SAMPLE TRIGGER FOR MIGRATION PURPOSES
 %triggerpostun -- %{name} < 1.3.9-1.4
+# rescue app configs. issue this in old config dir to get a list:
+# rpm -qfl .|grep `pwd`/|awk -F/ '{print $NF}'|egrep -v 'apache|httpd'|xargs
+for i in config.inc.php; do
+	if [ -f /etc/phpPgAdmin/$i.rpmsave ]; then
+		mv -f %{_sysconfdir}/$i{,.rpmnew}
+		mv -f /etc/phpPgAdmin/$i.rpmsave %{_sysconfdir}/$i
+	fi
+done
+
 # nuke very-old config location (this mostly for Ra)
 if [ -f /etc/httpd/httpd.conf ]; then
 	sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
@@ -153,6 +167,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.31  2005/12/03 21:09:28  glen
+- spec more to the real life for easier copy paste
+
 Revision 1.30  2005/11/30 20:20:39  glen
 - ugly typo fixed
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/template-webapp.spec?r1=1.30&r2=1.31&f=u




More information about the pld-cvs-commit mailing list