Changeset 111


Ignore:
Timestamp:
07/06/07 14:51:39 (17 years ago)
Author:
kdeugau
Message:

/trunk

Add basic epoch support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r110 r111  
    188188    $pkgdata{$pkg}{name} =~ tr/_/-/;
    189189
    190     my $pkgfullname = "$pkgdata{$pkg}{name}_$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb";
     190    my $pkgfullname = "$pkgdata{$pkg}{name}_".
     191        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     192        "$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb";
    191193
    192194    print "$pkgfullname\n" if $filelist{$pkg};
     
    194196  }
    195197  # Source package
    196   print "$pkgdata{main}{name}-$pkgdata{main}{version}-$pkgdata{main}{release}.sdeb\n";
     198  print "$pkgdata{main}{name}-".
     199        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     200        "$pkgdata{main}{version}-$pkgdata{main}{release}.sdeb\n";
    197201  exit 0;
    198202}
     
    797801      } elsif (/^name:\s+(.+)/i) {
    798802        $pkgdata{main}{name} = expandmacros($1,'g');
     803      } elsif (/^epoch:\s+(.+)/i) {
     804        $pkgdata{main}{epoch} = expandmacros($1,'g');
    799805      } elsif (/^version:\s+(.+)/i) {
    800806        $pkgdata{main}{version} = expandmacros($1,'g');
     
    10361042    print DEBSCRIPT $scriptletbase;
    10371043    print DEBSCRIPT "fakeroot dpkg-deb -b $buildroot/$pkg $topdir/DEBS/$pkgdata{$pkg}{arch}/".
    1038         "$pkgdata{$pkg}{name}_$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb\n";
     1044        "$pkgdata{$pkg}{name}_".
     1045        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     1046        "$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb\n";
    10391047      # %$&$%@#@@#%@@@ Debian and their horrible ugly package names.  >:(
    10401048    close DEBSCRIPT;
    10411049
    10421050    my $control = "Package: $pkgdata{$pkg}{name}\n".
    1043         "Version: $pkgdata{$pkg}{version}-$pkgdata{main}{release}\n".
     1051        "Version: ".
     1052        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     1053        "$pkgdata{$pkg}{version}-$pkgdata{main}{release}\n".
    10441054        "Section: $pkgdata{$pkg}{group}\n".
    10451055        "Priority: optional\n".
     
    11111121
    11121122    $finalmessages .= "Wrote binary package ".
    1113         "$pkgdata{$pkg}{name}_$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb".
     1123        "$pkgdata{$pkg}{name}_".
     1124        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     1125        "$pkgdata{$pkg}{version}-$pkgdata{main}{release}_$pkgdata{$pkg}{arch}.deb".
    11141126        " in $topdir/DEBS/$pkgdata{$pkg}{arch}\n";
    11151127    # and clean up
     
    11291141  # In case we were called with -bs.
    11301142  $pkgdata{main}{name} =~ tr/_/-/;
    1131   my $pkgsrcname = "$pkgdata{main}{name}-$pkgdata{main}{version}-$pkgdata{main}{release}.sdeb";
     1143  my $pkgsrcname = "$pkgdata{main}{name}-".
     1144        (defined($pkgdata{main}{epoch}) ? "$pkgdata{main}{epoch}:" : '').
     1145        "$pkgdata{main}{version}-$pkgdata{main}{release}.sdeb";
    11321146
    11331147  my $paxcmd;
Note: See TracChangeset for help on using the changeset viewer.