]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_builddeb
r308: * dh_suidregister: Die with understandable error message if asked to
[debhelper.git] / dh_builddeb
index a62e81cede06102d38c24909d987cfb0bdcc07a8..0822f5077a0be56657692c997fd9ba84c137af3c 100755 (executable)
@@ -1,7 +1,17 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
-# Build the .deb package, assuming all the files are set up in debian/tmp.
+# Build the .deb package, assuming all the files are set up.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
-doit "dpkg --build debian/tmp .."
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
+
+# Set the default destination directory.
+if (! defined $dh{DESTDIR}) {
+       $dh{DESTDIR}='..';
+}
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       doit("dpkg","--build",$TMP,$dh{DESTDIR},@{$dh{U_PARAMS}});
+}