Changeset 55 for trunk


Ignore:
Timestamp:
04/19/06 15:25:29 (19 years ago)
Author:
kdeugau
Message:

/trunk

Update POD with changes, updates, and other notes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r54 r55  
    1010# Last update by $Author$
    1111###
     12# Copyright 2005,2006 Kris Deugau <kdeugau@deepnet.cx>
    1213
    1314use strict;
     
    139140# followed by tweaking options to run with -ba
    140141if ($cmdopts{type} eq 's') {
    141   install_sdeb();
    142   my @srclist = qx { pax < $srcpkg };
     142  if ($srcpkg =~ /\.src\.rpm$/) {
     143    @srclist = qx { rpm -qlp $srcpkg };
     144    foreach (@srclist) {
     145      chomp;
     146      $specfile = "$topdir/SPECS/$_" if /\.spec$/;
     147    }
     148    qx { rpm -i $srcpkg };
     149  } else {
     150    install_sdeb();
     151    my @srclist = qx { pax < $srcpkg };
     152    foreach (@srclist) {
     153      chomp;
     154      $specfile = "$topdir/$_" if /SPECS/;
     155    }
     156  }
    143157  $cmdopts{type} = 'b';
    144158  $cmdopts{stage} = 'a';
    145   foreach (@srclist) {
    146     if (/SPECS/) {
    147       chomp;
    148       $specfile = "$topdir/$_";
    149     }
    150   }
    151159}
    152160
     
    11751183 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.tar.{gz|bz2}
    11761184
    1177  debbuild --rebuild file.src.{rpm|deb}
     1185 debbuild --rebuild file.{src.rpm|sdeb}
    11781186
    11791187=head1 DESCRIPTION
    11801188
    1181 This script attempts to build Debian-friendly semi-native packages
    1182 from RPM spec files, RPM-friendly tarballs, and RPM source packages
    1183 (.src.rpm).  It accepts I<most> of the options rpmbuild does, and
    1184 should be able to interpret most spec files usefully.  Perl modules
    1185 should be handled via CPAN+dh-make-perl instead;  Debian's conventions
    1186 for such things do not lend themselves to automated conversion.
    1187 
    1188 As far as possible, the command-line options are identical to those
    1189 from rpmbuild, although several rpmbuild options are not supported.
     1189This script attempts to build Debian-friendly semi-native packages from RPM spec files,
     1190RPM-friendly tarballs, and RPM source packages (.src.rpm files).  It accepts I<most> of the
     1191options rpmbuild does, and should be able to interpret most spec files usefully.  Perl
     1192modules should be handled via CPAN+dh-make-perl instead;  Debian's conventions for such
     1193things do not lend themselves to automated conversion.
     1194
     1195As far as possible, the command-line options are identical to those from rpmbuild, although
     1196several rpmbuild options are not supported.
     1197
     1198=head1 ASSUMPTIONS
     1199
     1200As with rpmbuild, debbuild makes some assumptions about your system.
     1201
     1202=over 4
     1203
     1204=item *
     1205
     1206Either you have rights to do as you please under /usr/src/debian, or you have created a file
     1207~/.debmacros containing a suitable %_topdir definition.
     1208
     1209Where rpmbuild requires %_topdir/{BUILD,RPMS,SOURCES,SPECS,SRPMS} directories, debbuild 
     1210requires %_topdir/{BUILD,DEBS,SOURCES,SPECS,SDEBS} directories.  Create them in advance; 
     1211some subdirectories are created automatically as needed, but most are not.
     1212
     1213=item *
     1214
     1215/var/tmp must allow script execution - rpmbuild and debbuild both rely on creating and
     1216executing shell scripts for much of their functionality.  By default, debbuild also creates
     1217install trees under /var/tmp - however this is (almost) entirely under the control of the
     1218package's .spec file.
     1219
     1220=item *
     1221 
     1222If you wish to --rebuild a .src.rpm, your %_topdir for both debbuild and rpmbuild must either
     1223match, or be suitably symlinked one direction or another so that both programs are effectively
     1224working in the same tree.  (Or you could just manually wrestle files around your system.)
     1225
     1226You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and save yourself some hassle
     1227if you need to rebuild .src.rpm packages on a regular basis.  Currently debbuild only uses the
     1228%_topdir macro definition, although there are many more things that rpmbuild can use from
     1229~/.rpmmacros.
     1230
     1231=back
     1232
     1233=head1 SEE ALSO
     1234
     1235rpm(8), rpmbuild(8), and pretty much any document describing how to write a .spec file
     1236
     1237=head1 BUGS
     1238
     1239Probably plenty.  If you see something objectionable in debbuild's behaviour, report it. 
     1240Send a patch if you feel inspired.  I don't promise I'll do anything other than say "Yup,
     1241that's broken." or "Got your message.".
    11901242
    11911243=cut
Note: See TracChangeset for help on using the changeset viewer.