]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - adapter.awk
- fixed typo in SourceX-size support
[packages/rpm-build-tools.git] / adapter.awk
index 258953c24aefc60ad4552adc68adc44ab369fcfc..dae3609a4f3f2a94d87d22289b55335503d008b0 100644 (file)
@@ -2,7 +2,7 @@
 #
 # This is adapter v0.27. Adapter adapts .spec files for PLD.
 #
-# Copyright (C) 1999-2001 PLD-Team <feedback@pld.org.pl>
+# Copyright (C) 1999-2003 PLD-Team <feedback@pld-linux.org>
 # Authors:
 #      Micha³ Kuratczyk <kura@pld.org.pl>
 #      Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
@@ -100,14 +100,6 @@ defattr == 1 {
                format_indent = -1
        }
 
-       # Define _prefix and _mandir if it is X11 application
-#      if (/^%description$/ && x11 == 1) {
-#              print "%define\t\t_prefix\t\t/usr/X11R6"
-#              print "%define\t\t_mandir\t\t%{_prefix}/man\n"
-#              prefix = "/usr/X11R6"
-#              x11 = 2
-#      }
-       
        # Format description
        if (description == 1 && !/^%[a-z]+/ && !/^%description/) {
                if (/^[ \t]*$/) {
@@ -271,25 +263,29 @@ defattr == 1 {
 /^%changelog/, (/^%[a-z]+$/ && !/^%changelog/) {
        preamble = 0
        has_changelog = 1
+       skip = 0
        # There should be some CVS keywords on the first line of %changelog.
-       if (boc == 1) {
-               if (!/\$Log$/) {
-                       print "$" "Log:$" > changelog_file
-               }
-               boc = 0
+       if (boc == 3) {
+               if (!/PLD Team/)
+                       print "* %{date} PLD Team <feedback@pld-linux.org>" > changelog_file
+               else
+                       skip = 1
+               boc = 2
        }
-       if (boc == 2) {
+       if (boc == 2 && !skip) {
                if (!/All persons listed below/) {
                        printf "All persons listed below can be reached at " > changelog_file
-                       print "<cvs_login>@pld.org.pl\n" > changelog_file
-               }
-               boc = 0
+                       print "<cvs_login>@pld-linux.org\n" > changelog_file
+               } else
+                       skip = 1
+               boc = 1
        }
-       if (boc == 3) {
-               if (!/PLD Team/) {
-                       print "* %{date} PLD Team <feedback@pld.org.pl>" > changelog_file
+       if (boc == 1 && !skip) {
+               if (!/^$/) {
+                       if (!/\$.*Log:.*\$/)
+                               print "$" "Log:$" > changelog_file
+                       boc = 0
                }
-               boc = 2
        }
        # Define date macro.
        if (boc == 4) {
@@ -450,7 +446,6 @@ preamble == 1 {
                        sub("^"prefix, $3, datadir)
                        sub("^"prefix, $3, includedir)
                        prefix = $3
-                       x11 = 2
                }
                if ($2 ~ /_bindir/ && !/_sbindir/)
                        bindir = $3
@@ -505,10 +500,10 @@ END {
                print "%changelog"
 
        if (boc > 2)
-               print "* %{date} PLD Team <feedback@pld.org.pl>"
+               print "* %{date} PLD Team <feedback@pld-linux.org>"
        if (boc > 1) {
                printf "All persons listed below can be reached at "
-               print "<cvs_login>@pld.org.pl\n"
+               print "<cvs_login>@pld-linux.org\n"
        }
        if (boc > 0)
                print "$" "Log:$"
@@ -551,11 +546,6 @@ function use_macros()
        if(prefix"/sbin" == sbindir)
                gsub("%{_prefix}/sbin", "%{_sbindir}")
 
-       gsub(libdir, "%{_libdir}")
-       gsub("%{prefix}/lib", "%{_libdir}")
-       if(prefix"/lib" == libdir)
-               gsub("%{_prefix}/lib", "%{_libdir}")
-
        for (c = 1; c <= NF; c++) {
                if ($c ~ sysconfdir "/{?cron.")
                        continue;
@@ -616,10 +606,9 @@ function use_macros()
        gsub("%{PACKAGE_VERSION}", "%{version}")
        gsub("%{PACKAGE_NAME}", "%{name}")
 
-       # we can move files between tge dirs below
+       # we can move files between the dirs below
        if ($0 !~ "%{_applnkdir}") {
                gsub("%{_datadir}/gnome/apps", "%{_applnkdir}")
-               gsub("%{_datadir}/applnk", "%{_applnkdir}")
        }
 
        gsub("^make$", "%{__make}")
This page took 0.029537 seconds and 4 git commands to generate.