commit dda3eaa5b1f3b8ee247c09d81d1b5e5da1995d38
Author: Sebastian Zagrodzki <[email protected]>
Date:   Tue May 9 21:09:53 2000 +0000

    - rm -rf $RPM_BUILD_ROOT at very beginnning of %install
    - adds %changelog and %define date if they aren'talready in spec.
    
    Changed files:
        adapter.awk -> 1.47

 adapter.awk | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index df4025a..cf43d02 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -5,7 +5,7 @@
 # Copyright (C) 1999, 2000 PLD-Team <[email protected]>
 # Authors:
 #      Micha� Kuratczyk <[email protected]>
-#      Sebastian Zagrodzki <[email protected]>
+#      Sebastian Zagrodzki <[email protected]>
 #      Tomasz K�oczko <[email protected]>
 #      Artur Frysiak <[email protected]>
 #      Michal Kochanowicz <[email protected]>
@@ -132,10 +132,22 @@ defattr == 1 {
 
 # %install section:
 /^%install/, (/^%[a-z]+$/ && !/^%install/) {
+       
        preamble = 0
        
-       use_macros()
+       if (/^[ \t]*rm([ \t]+-[rf]+)*[ \t]+\${?RPM_BUILD_ROOT}?/) {
+               did_clean=1
+               print "rm -rf $RPM_BUILD_ROOT"
+               next
+       }
 
+       if (!/^$/ && !/^%install/ && did_clean==0) {
+               print "rm -rf $RPM_BUILD_ROOT"
+               did_clean=1
+       }
+       
+       use_macros()
+       
        # 'install -d' instead 'mkdir -p'
        if (/mkdir -p/)
                sub(/mkdir -p/, "install -d")
@@ -182,7 +194,7 @@ defattr == 1 {
 # %changelog section:
 /^%changelog/, (/^%[a-z]+$/ && !/^%changelog/) {
        preamble = 0
-       
+       has_changelog = 1
        # There should be some CVS keywords on the first line of %changelog.
        if (boc == 1) {
                if (!/PLD Team/) {
@@ -304,7 +316,14 @@ END {
                print
        system("rm -f " changelog_file)
 
-       if (boc == 1) {
+       if (date == 0) {
+               print ""
+               print "%define date\t%(echo `LC_ALL=\"C\" date +\"%a %b %d 
%Y\"`)"
+       }
+
+       if (boc > 0) {
+               print ""
+               print "%changelog"
                print "* %{date} PLD Team <[email protected]>"
                printf "All persons listed below can be reached at "
                print "<cvs_login>@pld.org.pl\n"
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to