[packages/adapter: 170/631] - replace %{_{beta,rc,snap}} vars in sources

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


commit 755ab9c0e1ba58b8ea0e9f871cda8be7b4f62161
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Jul 16 16:03:41 2005 +0000

    - replace %{_{beta,rc,snap}} vars in sources
    
    Changed files:
        adapter.awk -> 1.164

 adapter.awk | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/adapter.awk b/adapter.awk
index 155f20b..4daae96 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -468,12 +468,23 @@ preamble == 1 {
 
 		filename = url[n]
 		url[n] = fixedsub(name, "%{name}", url[n])
-		if (field ~ /source/)
+		if (field ~ /source/) {
 			url[n] = fixedsub(version, "%{version}", url[n])
+			if (_beta) {
+				url[n] = fixedsub(_beta, "%{_beta}", url[n])
+			}
+			if (_rc) {
+				url[n] = fixedsub(_rc, "%{_rc}", url[n])
+			}
+			if (_snap) {
+				url[n] = fixedsub(_snap, "%{_snap}", url[n])
+			}
+		}
 		$2 = fixedsub(filename, url[n], $2)
 
 		# sourceforge urls
 		sub("[?]use_mirror=.*$", "", $2);
+		sub("[?]download$", "", $2);
 		sub("^http://prdownloads\.sourceforge\.net/", "http://dl.sourceforge.net/", $2)
 
 		sub("^http://.*\.dl\.sourceforge\.net/", "http://dl.sourceforge.net/", $2)
@@ -515,6 +526,13 @@ preamble == 1 {
 			mandir = $3
 		if ($2 ~ /_infodir/)
 			infodir = $3
+
+		if ($2 ~ /_beta/)
+			_beta = $3
+		if ($2 ~ /_rc/)
+			_rc = $3
+		if ($2 ~ /_snap/)
+			_snap = $3
 	}
 
 	if (field ~ /buildrequires:/) {
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list