[packages/adapter: 315/631] - buildroot replacements in %install. very nice!

glen glen at pld-linux.org
Mon Sep 12 20:00:51 CEST 2016


commit 3d8be7c3eb10dd613747a9df70a206f6c5c51451
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu May 4 19:13:54 2006 +0000

    - buildroot replacements in %install. very nice!
    
    Changed files:
        adapter.awk -> 1.303

 adapter.awk | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 3c42a41..513ce08 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -85,6 +85,7 @@ BEGIN {
 	"rpm --eval %py_sitedir" | getline py_sitedir
 	"rpm --eval %py_scriptdir " | getline py_scriptdir
 	"rpm --eval %php_pear_dir" | getline php_pear_dir
+	"rpm --eval %tmpdir" | getline tmpdir
 }
 
 # There should be a comment with CVS keywords on the first line of file.
@@ -450,6 +451,11 @@ function b_makekey(a, b,	s) {
 		did_rmroot=1
 	}
 
+    if (tmpdir) {
+        buildroot = tmpdir "/" name "-" version "-root-" ENVIRON["USER"]
+		gsub(buildroot, "$RPM_BUILD_ROOT")
+    }
+
 	use_macros()
 
 	# 'install -d' instead 'mkdir -p'
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list