X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_builddeb;h=45713fd946a64af09c61e78914b1ddbcad4edde4;hb=d92a7906608dcf6c697e912f73376c7f6b030fa8;hp=04b40f84e9aabdfd99642e21457c317a33cc68bc;hpb=89a8e4df94d07ca360f97f57ff22ac8f7f7c3a5f;p=debhelper.git diff --git a/dh_builddeb b/dh_builddeb index 04b40f8..45713fd 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 @@ -36,14 +36,17 @@ file name. Does not work well if more than one .deb is generated! =item B<--> I -Pass I to L when it is used to build the +Pass I to L when it is used to build the package. =back =cut -init(); +init(options => { + "filename=s" => \$dh{FILENAME}, + "destdir=s" => \$dh{DESTDIR}, +}); # Set the default destination directory. if (! defined $dh{DESTDIR}) { @@ -60,14 +63,31 @@ 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 $ENV{DH_ALWAYS_EXCLUDE} | xargs rm -rf"); + 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","--build",$tmp,"$dh{DESTDIR}$dh{FILENAME}",@{$dh{U_PARAMS}}); } =head1 SEE ALSO -L +L This program is a part of debhelper.