Changeset 35 for trunk


Ignore:
Timestamp:
02/13/06 17:55:34 (19 years ago)
Author:
kdeugau
Message:

/trunk

Checkpoint - source package sub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r34 r35  
    134134}
    135135
     136# -> srcpkg if -.s
     137if ($cmdopts{stage} eq 's') {
     138  srcpackage();
     139  exit 0;
     140}
     141
    136142# Hokay.  Need to:
    137143# -> prep if -.p OR (-.[cilabs] AND !--short-circuit)
     
    160166if ($cmdopts{stage} eq 'b') {
    161167  binpackage();
    162 }
    163 # -> srcpkg if -.s
    164 if ($cmdopts{stage} eq 's') {
    165   srcpackage();
    166168}
    167169
     
    743745
    744746
    745 sub srcpackage {}
     747## srcpackage()
     748# Builds a .src.deb source package.  Note that Debian's idea of
     749# a "source package" is seriously flawed IMO, because you can't
     750# easily copy it as-is.
     751sub srcpackage {
     752  # use pax -w [file] [file] ... >outfile.sdeb
     753  my $paxcmd = "cd %{_topdir}; pax -w ";
     754
     755# tweak source entry into usable form.  Need it locally somewhere along the line.
     756  (my $pkgsrc = $pkgdata{main}{source}) =~ s|.+/([^/]+)$|$1|;
     757  $paxcmd .= "$pkgsrc ";
     758
     759  # create file list:  Source[nn], Patch[nn]
     760  foreach my $specbit (keys %{$pkgdata{main}} ) {
     761    next if $specbit eq 'source';
     762    $paxcmd .= "$pkgdata{main}{$specbit} " if $specbit =~ /^(source|patch)/;
     763  }
     764
     765  # add the spec file now
     766  $paxcmd .= "$specfile > SDEBS/$pkgdata{main}{name}.sdeb";
     767
     768  $paxcmd = expandmacros($paxcmd,'gp');
     769 
     770  print "$paxcmd\n";
     771}
    746772
    747773
Note: See TracChangeset for help on using the changeset viewer.