Changeset 55
- Timestamp:
- 04/19/06 15:25:29 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r54 r55 10 10 # Last update by $Author$ 11 11 ### 12 # Copyright 2005,2006 Kris Deugau <kdeugau@deepnet.cx> 12 13 13 14 use strict; … … 139 140 # followed by tweaking options to run with -ba 140 141 if ($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 } 143 157 $cmdopts{type} = 'b'; 144 158 $cmdopts{stage} = 'a'; 145 foreach (@srclist) {146 if (/SPECS/) {147 chomp;148 $specfile = "$topdir/$_";149 }150 }151 159 } 152 160 … … 1175 1183 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.tar.{gz|bz2} 1176 1184 1177 debbuild --rebuild file. src.{rpm|deb}1185 debbuild --rebuild file.{src.rpm|sdeb} 1178 1186 1179 1187 =head1 DESCRIPTION 1180 1188 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. 1189 This script attempts to build Debian-friendly semi-native packages from RPM spec files, 1190 RPM-friendly tarballs, and RPM source packages (.src.rpm files). It accepts I<most> of the 1191 options rpmbuild does, and should be able to interpret most spec files usefully. Perl 1192 modules should be handled via CPAN+dh-make-perl instead; Debian's conventions for such 1193 things do not lend themselves to automated conversion. 1194 1195 As far as possible, the command-line options are identical to those from rpmbuild, although 1196 several rpmbuild options are not supported. 1197 1198 =head1 ASSUMPTIONS 1199 1200 As with rpmbuild, debbuild makes some assumptions about your system. 1201 1202 =over 4 1203 1204 =item * 1205 1206 Either 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 1209 Where rpmbuild requires %_topdir/{BUILD,RPMS,SOURCES,SPECS,SRPMS} directories, debbuild 1210 requires %_topdir/{BUILD,DEBS,SOURCES,SPECS,SDEBS} directories. Create them in advance; 1211 some 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 1216 executing shell scripts for much of their functionality. By default, debbuild also creates 1217 install trees under /var/tmp - however this is (almost) entirely under the control of the 1218 package's .spec file. 1219 1220 =item * 1221 1222 If you wish to --rebuild a .src.rpm, your %_topdir for both debbuild and rpmbuild must either 1223 match, or be suitably symlinked one direction or another so that both programs are effectively 1224 working in the same tree. (Or you could just manually wrestle files around your system.) 1225 1226 You could symlink ~/.rpmmacros to ~/.debmacros (or vice versa) and save yourself some hassle 1227 if 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 1235 rpm(8), rpmbuild(8), and pretty much any document describing how to write a .spec file 1236 1237 =head1 BUGS 1238 1239 Probably plenty. If you see something objectionable in debbuild's behaviour, report it. 1240 Send a patch if you feel inspired. I don't promise I'll do anything other than say "Yup, 1241 that's broken." or "Got your message.". 1190 1242 1191 1243 =cut
Note:
See TracChangeset
for help on using the changeset viewer.