X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_builddeb;h=3477f25765d2693107ab74d87bf4b9a79bf04e6e;hb=ed5e4269ab341fc82029344b0f11cca704058b89;hp=3d9f9d86e88130aef220002e4edb421eb3f6b252;hpb=dfc48628ab06f010bb18454d5d8e8701b1bcf58a;p=debhelper.git diff --git a/dh_builddeb b/dh_builddeb index 3d9f9d8..3477f25 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -2,7 +2,7 @@ =head1 NAME -dh_builddeb - build debian packages +dh_builddeb - build debian binary packages =cut @@ -15,7 +15,7 @@ B [S>] [B<--destdir=>I] [B<--filena =head1 DESCRIPTION -dh_builddeb simply calls L to build a debian package or +dh_builddeb simply calls L to build a debian package or packages. =head1 OPTIONS @@ -32,18 +32,24 @@ other than the default of ".." Use this if you want to force the generated .deb file to have a particular file name. Does not work well if more than one .deb is generated! -=item B<-u>I - =item B<--> I Pass I to L when it is used to build the package. +=item B<-u>I + +This is another way to pass I to L. +It is deprecated; use B<--> instead. + =back =cut -init(); +init(options => { + "filename=s" => \$dh{FILENAME}, + "destdir=s" => \$dh{DESTDIR}, +}); # Set the default destination directory. if (! defined $dh{DESTDIR}) { @@ -60,10 +66,26 @@ else { foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) { - complex_doit("find $tmp -name $_ | xargs rm -rf") - foreach split(":", $ENV{DH_ALWAYS_EXCLUDE}); + if (! compat(5)) { + complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf"); + } + else { + # Old broken code here for compatibility. Does not + # remove everything. + complex_doit("find $tmp -name $_ | xargs rm -rf") + foreach split(":", $ENV{DH_ALWAYS_EXCLUDE}); + } + } + if (! is_udeb($package)) { + doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME}); + } + else { + my $filename=$dh{FILENAME}; + if (! $filename) { + $filename="/".udeb_filename($package); + } + doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename); } - doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME}); } =head1 SEE ALSO