5 dh_builddeb - build debian binary packages
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--filename=>I<name>] [S<B<--> I<params>>]
18 dh_builddeb simply calls L<dpkg-deb(8)> to build a debian package or
25 =item B<--destdir=>I<directory>
27 Use this if you want the generated .deb files to be put in a directory
28 other than the default of ".."
30 =item B<--filename=>I<name>
32 Use this if you want to force the generated .deb file to have a particular
33 file name. Does not work well if more than one .deb is generated!
39 Pass I<params> to L<dpkg-deb(1)> when it is used to build the
47 "filename=s" => \$dh{FILENAME},
50 # Set the default destination directory.
51 if (! defined $dh{DESTDIR}) {
55 if (! defined $dh{FILENAME}) {
59 $dh{FILENAME}="/$dh{FILENAME}";
62 foreach my $package (@{$dh{DOPACKAGES}}) {
63 my $tmp=tmpdir($package);
64 if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
66 complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
69 # Old broken code here for compatibility. Does not
71 complex_doit("find $tmp -name $_ | xargs rm -rf")
72 foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
75 if (! is_udeb($package)) {
76 doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
79 my $filename=$dh{FILENAME};
81 $filename="/".udeb_filename($package);
83 doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
91 This program is a part of debhelper.
95 Joey Hess <joeyh@debian.org>