Changeset 69 for trunk


Ignore:
Timestamp:
06/21/06 12:36:16 (18 years ago)
Author:
kdeugau
Message:

/trunk

Clean up handling of %setup expansion - support both -c and -n.
Note that just like rpm, -c MUST come before -n, eg:

%setup -c -n mybuilddirname

not:

%setup -n -c mybuilddirname

I think it'll even fail the same way...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r68 r69  
    444444              $tarballdir = "$pkgdata{main}{name}-$pkgdata{main}{version}";
    445445            }
    446             $prepscript .= "rm -rf $tarballdir\ntar -".
     446            $tarballdir = expandmacros($tarballdir,'gp');
     447            $prepscript .= "rm -rf $tarballdir\n";
     448            if (/\s+-c\s+/) {
     449              $prepscript .= "mkdir $tarballdir\ncd $tarballdir\n";
     450            }
     451            $prepscript .= "tar -".
    447452                ( $pkgdata{main}{source} =~ /\.tar\.gz$/ ? "z" : "" ).
    448453                ( $pkgdata{main}{source} =~ /\.tar\.bz2$/ ? "j" : "" ).
     
    450455                "$topdir/SOURCES/$pkgdata{main}{source}\n".
    451456                qq(STATUS=\$?\nif [ \$STATUS -ne 0 ]; then\n  exit \$STATUS\nfi\n).
    452                 ( /\s+-n\s+([^\s]+)\s+/ ?
    453                   "cd $1\n" : "cd $pkgdata{main}{name}-$pkgdata{main}{version}\n" ).
     457                "cd $topdir/BUILD/$tarballdir\n".
    454458                qq([ `/usr/bin/id -u` = '0' ] && /bin/chown -Rhf root .\n).
    455459                qq([ `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rhf root .\n).
Note: See TracChangeset for help on using the changeset viewer.