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 B<dh_builddeb> simply calls L<dpkg-deb(1)> to build a Debian package or
25 =item B<--destdir=>I<directory>
27 Use this if you want the generated F<.deb> files to be put in a directory
28 other than the default of "F<..>".
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!
37 Pass I<params> to L<dpkg-deb(1)> when it is used to build the
42 This is another way to pass I<params> to L<dpkg-deb(1)>.
43 It is deprecated; use B<--> instead.
50 "filename=s" => \$dh{FILENAME},
51 "destdir=s" => \$dh{DESTDIR},
54 # Set the default destination directory.
55 if (! defined $dh{DESTDIR}) {
59 if (! defined $dh{FILENAME}) {
63 $dh{FILENAME}="/$dh{FILENAME}";
68 if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS}=~/parallel=(\d+)/) {
72 foreach my $package (@{$dh{DOPACKAGES}}) {
76 while ($processes > $max_procs) {
84 my $tmp=tmpdir($package);
85 if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
87 complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
90 # Old broken code here for compatibility. Does not
92 complex_doit("find $tmp -name $_ | xargs rm -rf")
93 foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
96 if (! is_udeb($package)) {
97 doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
100 my $filename=$dh{FILENAME};
102 $filename="/".udeb_filename($package);
104 doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
106 exit (0) if ($max_procs > 1);
109 error("fork failed!");
114 while (($max_procs > 0) && (wait != -1)) {}
120 This program is a part of debhelper.
124 Joey Hess <joeyh@debian.org>