SPECS: adapter.awk - fix for %post ldconfig

glen glen at pld-linux.org
Mon Dec 12 16:19:21 CET 2005


Author: glen                         Date: Mon Dec 12 15:19:21 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fix for %post ldconfig

---- Files affected:
SPECS:
   adapter.awk (1.229 -> 1.230) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.229 SPECS/adapter.awk:1.230
--- SPECS/adapter.awk:1.229	Mon Dec 12 15:58:32 2005
+++ SPECS/adapter.awk	Mon Dec 12 16:19:10 2005
@@ -344,7 +344,7 @@
 		sub("CC=%{__cc}", "CC=\"%{__cc}\"")
 	}
 	
-	# use macros
+	# use PLD Linux macros
 	$0 = fixedsub("glib-gettextize --copy --force","%{__glib_gettextize}", $0);
 	$0 = fixedsub("intltoolize --copy --force", "%{__intltoolize}", $0);
 	$0 = fixedsub("automake --add-missing --copy", "%{__automake}", $0);
@@ -364,7 +364,11 @@
 ##########
 /^%clean/, (/^%[a-z]+$/ && !/^%clean/ && !/^%((end)?if|else)/) {
 	did_clean = 1
-	use_macros()
+
+	# prevent next section header like "%post -p /sbin/ldconfig" being adapterized
+	if (!/^%/) {
+		use_macros()
+	}
 }
 
 ############
@@ -427,7 +431,6 @@
 	if ($0 ~ /^%files/)
 		defattr = 1
 
-	use_macros()
 	use_files_macros()
 }
 
@@ -991,6 +994,8 @@
 
 function use_files_macros(	i, n, t, a)
 {
+	use_macros()
+
 	gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
 	gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.229&r2=1.230&f=u




More information about the pld-cvs-commit mailing list