[packages/adapter: 361/631] - noet

glen glen at pld-linux.org
Mon Sep 12 20:04:42 CEST 2016


commit b6875e34bae5c6b1e9cfd85536e96d6901014c06
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Feb 12 21:52:30 2007 +0000

    - noet
    
    Changed files:
        adapter.awk -> 1.348

 adapter.awk | 194 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 97 insertions(+), 97 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 76e1efd..bb4f0bb 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -36,7 +36,7 @@ BEGIN {
 	tw = 70			# Descriptions width
 
 	b_idx = 0		# index of BR/R arrays
-    BR_count = 0   # number of additional BuildRequires
+	BR_count = 0	# number of additional BuildRequires
 
 	# If variable removed, then 1 (for removing it from export)
 	removed["LDFLAGS"] = 0
@@ -122,31 +122,31 @@ defattr == 1 {
 function b_makekey(a, b,	s) {
 	s = a "" b;
 	# kill bcond
-    gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s);
+	gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s);
 
 	# kill commented out items
-    gsub(/^#[ \t]*/, "", s);
+	gsub(/^#[ \t]*/, "", s);
 
 	# force order
-    gsub(/^Summary\(/, "11Summary(", s);
-    gsub(/^Summary/, "10Summary", s);
-    gsub(/^Name/, "2Name", s);
-    gsub(/^Version/, "3Version", s);
-    gsub(/^Release/, "4Release", s);
-    gsub(/^Epoch/, "5Epoch", s);
-    gsub(/^License/, "5License", s);
-    gsub(/^Group/, "6Group", s);
-    gsub(/^URL/, "7URL", s);
-
-    gsub(/^BuildRequires/, "B1BuildRequires", s);
-    gsub(/^BuildConflicts/, "B2BuildConflicts", s);
-    gsub(/^Provides/, "X1Provides", s);
-    gsub(/^Obsoletes/, "X2Obsoletes", s);
-    gsub(/^Conflicts/, "X3Conflicts", s);
-    gsub(/^BuildArch/, "X4BuildArch", s);
-    gsub(/^ExclusiveArch/, "X6ExclusiveArch", s);
-    gsub(/^ExcludeArch/, "X7ExcludeArch", s);
-    gsub(/^BuildRoot/, "X9BuildRoot", s);
+	gsub(/^Summary\(/, "11Summary(", s);
+	gsub(/^Summary/, "10Summary", s);
+	gsub(/^Name/, "2Name", s);
+	gsub(/^Version/, "3Version", s);
+	gsub(/^Release/, "4Release", s);
+	gsub(/^Epoch/, "5Epoch", s);
+	gsub(/^License/, "5License", s);
+	gsub(/^Group/, "6Group", s);
+	gsub(/^URL/, "7URL", s);
+
+	gsub(/^BuildRequires/, "B1BuildRequires", s);
+	gsub(/^BuildConflicts/, "B2BuildConflicts", s);
+	gsub(/^Provides/, "X1Provides", s);
+	gsub(/^Obsoletes/, "X2Obsoletes", s);
+	gsub(/^Conflicts/, "X3Conflicts", s);
+	gsub(/^BuildArch/, "X4BuildArch", s);
+	gsub(/^ExclusiveArch/, "X6ExclusiveArch", s);
+	gsub(/^ExcludeArch/, "X7ExcludeArch", s);
+	gsub(/^BuildRoot/, "X9BuildRoot", s);
 
 #	printf("%s -> %s\n", a""b, s);
 	return s;
@@ -347,7 +347,7 @@ function b_makekey(a, b,	s) {
 	if (/^%setup/ && /-n %{name}-%{version}( |$)/) {
 		$0 = fixedsub(" -n %{name}-%{version}", "", $0)
 	}
-    sub("^%patch ", "%patch0 ");
+	sub("^%patch ", "%patch0 ");
 
 	# invalid in %prep
 	sub("^rm -rf \$RPM_BUILD_ROOT.*", "");
@@ -439,7 +439,7 @@ function b_makekey(a, b,	s) {
 /^%clean/, (!/^%clean/ && $0 ~ SECTIONS) {
 	did_clean = 1
 
-    use_macros()
+	use_macros()
 }
 
 ############
@@ -451,8 +451,8 @@ function b_makekey(a, b,	s) {
 
 	# foreign rpms
 	sub("^%{__rm} -rf %{buildroot}", "rm -rf $RPM_BUILD_ROOT")
-    sub("%buildroot", "$RPM_BUILD_ROOT");
-    sub("%{buildroot}", "$RPM_BUILD_ROOT");
+	sub("%buildroot", "$RPM_BUILD_ROOT");
+	sub("%{buildroot}", "$RPM_BUILD_ROOT");
 
 	if (/^[ \t]*rm([ \t]+-[rf]+)*[ \t]+(\${?RPM_BUILD_ROOT}?|%{?buildroot}?)/ && did_rmroot==0) {
 		did_rmroot=1
@@ -465,14 +465,14 @@ function b_makekey(a, b,	s) {
 		did_rmroot=1
 	}
 
-    if (tmpdir) {
-        buildroot = tmpdir "/" name "-" version "-root-" ENVIRON["USER"]
+	if (tmpdir) {
+		buildroot = tmpdir "/" name "-" version "-root-" ENVIRON["USER"]
 		gsub(buildroot, "$RPM_BUILD_ROOT")
-    }
+	}
 
-    if (!/%{_lib}/) {
-        sub("\$RPM_BUILD_ROOT/%", "$RPM_BUILD_ROOT%")
-    }
+	if (!/%{_lib}/) {
+		sub("\$RPM_BUILD_ROOT/%", "$RPM_BUILD_ROOT%")
+	}
 
 	use_macros()
 
@@ -481,7 +481,7 @@ function b_makekey(a, b,	s) {
 		sub(/mkdir -p/, "install -d")
 
 	# cp -a already implies cp -r
-    sub(/^cp -ar/, "cp -a")
+	sub(/^cp -ar/, "cp -a")
 
 	# No '-u root' or '-g root' for 'install'
 	if (/^install/ && /-[ug][ \t]*root/)
@@ -720,7 +720,7 @@ preamble == 1 {
 		value = substr($0, index($0, $2));
 		$0 = format_requires($1, value);
 	}
-    
+
 	# BR: tar (and others) is to common (rpm-build requires it)
 	if (field ~ /^buildrequires:/) {
 		l = substr($0, index($0, $2));
@@ -744,9 +744,9 @@ preamble == 1 {
 			next
 		}
 
-        # perhaps we have common known name?
+		# perhaps we have common known name?
 
-        # jpackages
+		# jpackages
 		sub(/^java-devel$/, "jdk", $2);
 		sub(/^log4j$/, "jakarta-log4j", $2);
 		sub(/^oro$/, "jakarta-oro", $2);
@@ -757,12 +757,12 @@ preamble == 1 {
 		sub(/^xalan-j2$/, "xalan-j", $2);
 		sub(/^xerces-j2$/, "xerces-j", $2);
 
-        replace_php_virtual_deps();
+		replace_php_virtual_deps();
 	}
 
 	if (field ~ /^requires:/) {
-        replace_php_virtual_deps();
-    }
+		replace_php_virtual_deps();
+	}
 
 
 	# obsolete/unwanted tags
@@ -938,9 +938,9 @@ preamble == 1 {
 #
 # NOTES:
 # - mixing BR/R and anything else confuses this (all will be sorted together)
-#   so don't do that.
+#	so don't do that.
 # - comments leading the BR/R can not be associated,
-#   so don't adapterize when the BR/R are mixed with comments
+#	so don't adapterize when the BR/R are mixed with comments
 ENVIRON["SKIP_SORTBR"] != 1 && preamble == 1 && $0 ~ PREAMBLE_TAGS, $0 ~ PREAMBLE_TAGS {
 	if ($1 ~ /Pre[Rr]eq:/) {
 		sub(/Pre[Rr]eq:/, "Requires:", $1);
@@ -1006,12 +1006,12 @@ END {
 	if (do_not_touch_anything)
 		exit 0
 
-    # TODO: need to output these in proper place
-    if (BR_count > 0) {
-        for (i = 0; i <= BR_count; i++) {
-            print BR[i];
-        }
-    }
+	# TODO: need to output these in proper place
+	if (BR_count > 0) {
+		for (i = 0; i <= BR_count; i++) {
+			print BR[i];
+		}
+	}
 
 	close(changelog_file)
 	while ((getline < changelog_file) > 0)
@@ -1031,18 +1031,18 @@ END {
 
 	if (has_changelog == 0) {
 		print "%changelog"
-    }
+	}
 
 	if (boc > 2) {
 		print "* %{date} PLD Team <feedback at pld-linux.org>"
-    }
+	}
 	if (boc > 1) {
 		printf "All persons listed below can be reached at "
 		print "<cvs_login>@pld-linux.org\n"
 	}
 	if (boc > 0) {
 		print "$" "Log:$"
-    }
+	}
 }
 
 function fixedsub(s1,s2,t, ind) {
@@ -1062,9 +1062,9 @@ function format_preamble()
 	if (match($0, /[A-Za-z0-9(),#_ \t.-]+[ \t]*:[ \t]*/) == 1) {
 		if (RLENGTH < 8) {
 			sub(/:/, ":\t\t")
-        } else {
+		} else {
 			sub(/:/, ":\t")
-        }
+		}
 	}
 }
 
@@ -1081,9 +1081,9 @@ function use_macros()
 		return;
 	}
 
-    sub("%{_defaultdocdir}", "%{_docdir}");
-    sub("%{_bindir}/perl", "%{__perl}");
-    sub("%{_bindir}/python", "%{__python}");
+	sub("%{_defaultdocdir}", "%{_docdir}");
+	sub("%{_bindir}/perl", "%{__perl}");
+	sub("%{_bindir}/python", "%{__python}");
 
 	gsub(infodir, "%{_infodir}")
 
@@ -1306,22 +1306,22 @@ function use_macros()
 	gsub("%_sbindir", "%{_sbindir}")
 	gsub("%_mandir", "%{_mandir}")
 	gsub("%name", "%{name}")
-    gsub(/%__rm/, "rm");
-    gsub(/%__mkdir_p/, "install -d");
-    gsub(/%__cp/, "cp");
-    gsub(/%__ln_s/, "ln -s");
-    gsub(/%__sed/, "%{__sed}");
-    gsub(/%__cat/, "cat");
-    gsub(/%__chmod/, "chmod");
+	gsub(/%__rm/, "rm");
+	gsub(/%__mkdir_p/, "install -d");
+	gsub(/%__cp/, "cp");
+	gsub(/%__ln_s/, "ln -s");
+	gsub(/%__sed/, "%{__sed}");
+	gsub(/%__cat/, "cat");
+	gsub(/%__chmod/, "chmod");
 
 	gsub("/usr/src/linux", "%{_kernelsrcdir}")
 	gsub("%{_prefix}/src/linux", "%{_kernelsrcdir}")
 
 	if (/^ant /) {
 		sub(/^ant/, "%ant")
-        add_br("BuildRequires:  jpackage-utils");
-        add_br("BuildRequires:  rpmbuild(macros) >= 1.300");
-    }
+		add_br("BuildRequires:  jpackage-utils");
+		add_br("BuildRequires:  rpmbuild(macros) >= 1.300");
+	}
 
 }
 
@@ -1434,12 +1434,12 @@ function use_files_macros(	i, n, t, a)
 		gsub("%attr\\(0", "%attr(")
 	}
 
-    # kill default attrs
-    gsub(/%dir %attr\(755,root,root\)/, "%dir");
-    gsub(/%attr\(755,root,root\) %dir/, "%dir");
-    if (!/%dir/) {
-        gsub(/%attr\(644,root,root\) /, "");
-    }
+	# kill default attrs
+	gsub(/%dir %attr\(755,root,root\)/, "%dir");
+	gsub(/%attr\(755,root,root\) %dir/, "%dir");
+	if (!/%dir/) {
+		gsub(/%attr\(644,root,root\) /, "");
+	}
 
 	# sort %verify attrs
 	if (match($0, /%verify\(not([^)]+)\)/)) {
@@ -1624,37 +1624,37 @@ function use_tabs()
 
 function add_br(br)
 {
-    BR[BR_count++] = br
+	BR[BR_count++] = br
 }
 
 # php virtual deps as discussed in devel-en
 function replace_php_virtual_deps()
 {
-    pkg = $2
-#    if (pkg == "php-program") {
-#        $0 = $1 "\t/usr/bin/php"
-#        return
-#    }
-
-    if (pkg ~ /^php-[a-z]/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs|program|pecl-)/) {
-        sub(/^php-/, "php(", pkg);
-        sub(/$/, ")", pkg);
-        $2 = pkg
-    }
-
-    if (pkg ~/^php$/) {
-        $2 = "webserver(php)";
-        if ($4 ~ /^[0-9]:/) {
-            $4 = substr($4, 3);
-        }
-    }
-
-    if (pkg ~/^php4$/) {
-        $2 = "webserver(php)";
-        if ($4 ~ /^[0-9]:/) {
-            $4 = substr($4, 3);
-        }
-    }
+	pkg = $2
+#	if (pkg == "php-program") {
+#		$0 = $1 "\t/usr/bin/php"
+#		return
+#	}
+
+	if (pkg ~ /^php-[a-z]/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs|program|pecl-)/) {
+		sub(/^php-/, "php(", pkg);
+		sub(/$/, ")", pkg);
+		$2 = pkg
+	}
+
+	if (pkg ~/^php$/) {
+		$2 = "webserver(php)";
+		if ($4 ~ /^[0-9]:/) {
+			$4 = substr($4, 3);
+		}
+	}
+
+	if (pkg ~/^php4$/) {
+		$2 = "webserver(php)";
+		if ($4 ~ /^[0-9]:/) {
+			$4 = substr($4, 3);
+		}
+	}
 }
 
 # vim:ts=4:sw=4
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list