[packages/adapter: 171/631] - more fixes for external specs

glen glen at pld-linux.org
Mon Sep 12 19:48:47 CEST 2016


commit ac779c715db0663c4b63db9dcc332036a1d072e4
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sun Jul 24 22:15:30 2005 +0000

    - more fixes for external specs
    
    Changed files:
        adapter.awk -> 1.165

 adapter.awk | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 4daae96..58a0b73 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -164,6 +164,8 @@ defattr == 1 {
 /^%prep/, (/^%[a-z]+$/ && !/^%prep/ && !/^%((end)?if|else)/) {
 	preamble = 0
 
+	use_macros()
+
 	# Add '-q' to %setup
 	if (/^%setup/ && !/-q/) {
 		sub(/^%setup/, "%setup -q")
@@ -172,6 +174,9 @@ defattr == 1 {
 	if (/^%setup/ && /-n %{name}-%{version}( |$)/) {
 		sub(/ -n %{name}-%{version}/, "")
 	}
+
+	# invalid in %prep
+	sub("^rm -rf \$RPM_BUILD_ROOT.*", "");
 }
 
 ##########
@@ -726,6 +731,10 @@ function use_macros()
 
 	gsub("^%{__make} install DESTDIR=\$RPM_BUILD_ROOT", "%{__make} install \\\n\tDESTDIR=$RPM_BUILD_ROOT")
 	gsub("^fix-info-dir$", "[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>\&1")
+	gsub("%buildroot", "$RPM_BUILD_ROOT")
+	gsub("%_bindir", "%{_bindir}")
+	gsub("%_datadir", "%{_datadir}")
+	gsub("%_iconsdir", "%{_iconsdir}")
 
 	gsub("/usr/src/linux", "%{_kernelsrcdir}")
 	gsub("%{_prefix}/src/linux", "%{_kernelsrcdir}")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list