]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_builddeb
Updated French man page translation. Closes: #685560
[debhelper.git] / dh_builddeb
index df21cc06c8b8744653bc36c650d92ae21198556f..bf9fc27d39aafdfb2c42545cd5cd213158b42b30 100755 (executable)
@@ -18,6 +18,9 @@ B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--filena
 B<dh_builddeb> simply calls L<dpkg-deb(1)> to build a Debian package or
 packages.
 
+It supports building multiple binary packages in parallel, when enabled by
+DEB_BUILD_OPTIONS.
+
 =head1 OPTIONS
 
 =over 4
@@ -63,10 +66,7 @@ else {
        $dh{FILENAME}="/$dh{FILENAME}";
 }
 
-my $max_procs=1;
-if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS}=~/parallel=(\d+)/) {
-       $max_procs=$1;
-}
+my $max_procs=get_buildoption("parallel") || 1;
 
 my $processes=1;
 my $exit=0;
@@ -85,8 +85,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        if (! defined $pid) {
                error("fork failed! $!");
        }
-       $processes++;
        if ($pid) { # parent
+               $processes++;
                reap while $processes > $max_procs;
                next;
        }
@@ -112,7 +112,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                if (! $filename) {
                        $filename="/".udeb_filename($package);
                }
-               doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
+               doit("dpkg-deb", "-z1", "-Zxz", "-Sextreme",
+                       @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
        }
        exit 0;
 }