=head1 NAME
-dh_builddeb - build debian packages
+dh_builddeb - build debian binary packages
=cut
=cut
-init();
+init(options => {
+ "filename=s" => \$dh{FILENAME},
+ "destdir=s" => \$dh{DESTDIR},
+});
# Set the default destination directory.
if (! defined $dh{DESTDIR}) {
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-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
}
=head1 SEE ALSO