]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- adapterize from some metadata file
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 4 Mar 2006 10:30:14 +0000 (10:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- add buildroot

Changed files:
    adapter.awk -> 1.287

adapter.awk

index fe97f7c3db64c24cf90af67b963a06089555301b..cd93d92fe81f2f9c6f5056b4607fdf4031295c13 100644 (file)
@@ -638,7 +638,7 @@ preamble == 1 {
        }
 
        # obsolete/unwanted tags
-       if (field ~ /vendor:|packager:|distribution:|docdir:|prefix:|icon:/) {
+       if (field ~ /vendor:|packager:|distribution:|docdir:|prefix:|icon:|author:|author-email:|metadata-version:/) {
                next
        }
 
@@ -674,13 +674,23 @@ preamble == 1 {
                release_seen = 1;
        }
 
+       if (field ~ /buildroot:/) {
+               did_build_root = 1
+       }
+
        if (field ~ /serial:/)
                $1 = "Epoch:"
 
+       if (field ~ /home-page:/)
+               $1 = "URL:"
+
        # proper caps
        if (field ~ /^url:$/)
                $1 = "URL:"
 
+       if (field ~ /^description:$/)
+               $1 = "\n%description\n"
+
        # Use %{name} and %{version} in the filenames in "Source:"
        if (field ~ /^source/ || field ~ /patch/) {
                n = split($2, url, /\//)
@@ -835,6 +845,11 @@ preamble == 1 {
                print "Release:\t" release
                release_seen = 1
        }
+
+       if (did_build_root == 0) {
+               print "BuildRoot:\t%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
+               did_build_root = 1
+       }
 }
 
 
This page took 0.155285 seconds and 4 git commands to generate.