[packages/adapter: 395/631] - add %{subver} support

glen glen at pld-linux.org
Mon Sep 12 20:07:33 CEST 2016


commit 3c5e6e5fb52f2f41bc819c3c0fb034fa096b5d3a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Jan 11 13:33:33 2008 +0000

    - add %{subver} support
    
    Changed files:
        adapter.awk -> 1.377

 adapter.awk | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index 7467737..ffa9af8 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -250,6 +250,8 @@ function b_makekey(a, b,	s) {
 		_pre = $3
 	if ($2 ~ /^_snap$/)
 		_snap = $3
+	if ($2 ~ /^subver$/)
+		subver = $3
 
 	# these are used usually when adapterizing external spec
 	if ($2 ~ /^name$/)
@@ -351,6 +353,9 @@ function b_makekey(a, b,	s) {
 		if (_snap) {
 			$0 = fixedsub(_snap, "%{_snap}", $0);
 		}
+		if (subver) {
+			$0 = fixedsub(subver, "%{subver}", $0);
+		}
 	}
 
 	if (/^%setup/ && /-n %{name}-%{version}( |$)/) {
@@ -904,6 +909,9 @@ preamble == 1 {
 			if (_snap) {
 				url[n] = fixedsub(_snap, "%{_snap}", url[n])
 			}
+			if (subver) {
+				url[n] = fixedsub(subver, "%{subver}", url[n])
+			}
 		}
 		# assigning to $2 kills preamble formatting
 		$2 = fixedsub(filename, url[n], $2)
@@ -1597,6 +1605,9 @@ function demacroize(str)
 	if (_snap) {
 		sub("%{_snap}", _snap, str);
 	}
+	if (subver) {
+		sub("%{subver}", subver, str);
+	}
 	return str;
 }
 
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list