Changeset 179 for trunk/debbuild


Ignore:
Timestamp:
01/31/14 17:07:33 (10 years ago)
Author:
kdeugau
Message:

/trunk

Handle an edge case where no %setup tag is used
Expand macros in a couple of new places to match rpmbuild

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r178 r179  
    683683    if (/^\%build/) {
    684684      $stage = 'build';
    685       $buildscript .= "cd $tarballdir\n";
     685      $buildscript .= "cd $tarballdir\n" if $pkgdata{main}{hassetup};
    686686      next LINE;
    687687    } # %build
     
    689689    if (/^\%install/) {
    690690      $stage = 'install';
    691       $installscript .= "cd $tarballdir\n";
     691      $installscript .= "cd $tarballdir\n" if $pkgdata{main}{hassetup};
    692692      next LINE;
    693693    } # %install
     
    695695    if (/^\%clean/) {
    696696      $stage = 'clean';
    697       $cleanscript .= "cd $tarballdir\n";
     697      $cleanscript .= "cd $tarballdir\n" if $pkgdata{main}{hassetup};
    698698      next LINE;
    699699    } # %clean
     
    759759      # include %patch tags, may be just a bare shell script.
    760760      if (/^\%setup/) {
     761        $pkgdata{main}{hassetup} = 1;  # flag the fact that we've got %setup
    761762        # Parse out the %setup macro.  Note that we aren't supporting
    762763        # many of RPM's %setup features.
     
    12911292    close DEBSCRIPT;
    12921293
     1294    $pkgdata{$pkg}{summary} = expandmacros($pkgdata{$pkg}{summary}, 'gp');
    12931295    my $control = "Package: $pkgdata{$pkg}{name}\n".
    12941296        "Version: ".(defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     
    13061308        ( defined($pkgdata{$pkg}{replaces}) ? "Replaces: $pkgdata{$pkg}{replaces}\n" : '' ).
    13071309        "Description: $pkgdata{$pkg}{summary}\n";
     1310    $pkgdata{$pkg}{desc} = expandmacros($pkgdata{$pkg}{desc}, 'gp');
    13081311    # Munge things so that Debian tools don't choke on errant blank lines
    13091312    $pkgdata{$pkg}{desc} =~ s/\s+$//g;          # Trim trailing blanks
     
    14661469sub checkbuildreq {
    14671470  return 1 if $buildreq eq '';  # No use doing extra work.
     1471
     1472  # expand macros
     1473  $buildreq = expandmacros($buildreq,'gp');
    14681474
    14691475  if ( ! -e "/usr/bin/dpkg-query" ) {
Note: See TracChangeset for help on using the changeset viewer.