]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_builddeb
r380: * dh_builddeb: added a --filename option to specify the output filename.
[debhelper.git] / dh_builddeb
index a62e81cede06102d38c24909d987cfb0bdcc07a8..15f4e397e0610889acb5d5d48a6e7b8260c63c69 100755 (executable)
@@ -1,7 +1,20 @@
-#!/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 .."
+use Debian::Debhelper::Dh_Lib;
+init();
+
+# Set the default destination directory.
+if (! defined $dh{DESTDIR}) {
+       $dh{DESTDIR}='..';
+}
+
+if (! defined $dh{FILENAME}) {
+       $dh{FILENAME}='';
+}
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       doit("dpkg","--build",$TMP,"$dh{DESTDIR}/$dh{FILENAME}",@{$dh{U_PARAMS}});
+}