Changeset 15


Ignore:
Timestamp:
11/08/05 17:16:30 (19 years ago)
Author:
kdeugau
Message:

/trunk

Checkpoint
Added more-or-less support for %{sourcenn} macro expansion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r14 r15  
    412412        $pkgdata{main}{source} = $1;
    413413        die "Unknown tarball format $1\n" if $1 !~ /\.tar\.(?:gz|bz2)$/;
     414      } elsif (/^source([0-9]+):\s+(.+)/i) {
     415        $pkgdata{sources}{$1} = $2;
    414416      } elsif (/^patch([^:]+):\s+(.+)$/i) {
    415417        $pkgdata{main}{"patch$1"} = $2;
     
    653655  # Package data
    654656  if ($section =~ /p/) {
    655     $macrostring =~ s/\%\{buildroot\}/$buildroot/g;
    656 
    657     $macrostring =~ s/\%\{name\}/$pkgdata{main}{name}/g;
    658     $macrostring =~ s/\%\{version\}/$pkgdata{main}{version}/g;
    659     $macrostring =~ s/\%\{release\}/$pkgdata{main}{release}/g;
     657    $macrostring =~ s/\%\{buildroot\}/$buildroot/gi;
     658    foreach my $source (keys %{$pkgdata{sources}}) {
     659      $macrostring =~ s/\%\{source$source\}/$topdir\/SOURCES\/$pkgdata{sources}{$source}/gi;
     660    }
     661    $macrostring =~ s/\%\{name\}/$pkgdata{main}{name}/gi;
     662    $macrostring =~ s/\%\{version\}/$pkgdata{main}{version}/gi;
     663    $macrostring =~ s/\%\{release\}/$pkgdata{main}{release}/gi;
    660664  }
    661665
Note: See TracChangeset for help on using the changeset viewer.