]> git.donarmstrong.com Git - debhelper.git/blob - dh_builddeb
r426: update
[debhelper.git] / dh_builddeb
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_builddeb - build debian packages
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14   dh_builddeb [debhelper options] [--destdir=directory] 
15               [--name=filename] [-uparams] [-- params]
16
17 =head1 DESCRIPTION
18
19 dh_builddeb simply calls L<dpkg(8)> to build a debian package or
20 packages.
21
22 =head1 OPTIONS
23
24 =over 4
25
26 =item B<--destdir=>I<directory>
27
28 Use this if you want the generated .deb files to be put in a directory
29 other than the default of ".."
30
31 =item B<--name=>I<filename>
32
33 Use this if you want to force the generated .deb file to have a particular
34 file name. Does not work well if more than one .deb is generated!
35
36 =item B<-u>I<params>
37 =item B<--> I<params>
38
39 Pass I<params> to L<dpkg(1)|dpkg> when it is used to build the
40 package.
41
42 =back
43
44 =cut
45
46 init();
47
48 # Set the default destination directory.
49 if (! defined $dh{DESTDIR}) {
50         $dh{DESTDIR}='..';
51 }
52
53 if (! defined $dh{FILENAME}) {
54         $dh{FILENAME}='';
55 }
56 else {
57         $dh{FILENAME}="/$dh{FILENAME}";
58 }
59
60 foreach my $package (@{$dh{DOPACKAGES}}) {
61         my $tmp=tmpdir($package);
62         doit("dpkg","--build",$tmp,"$dh{DESTDIR}$dh{FILENAME}",@{$dh{U_PARAMS}});
63 }
64
65 =head1 SEE ALSO
66
67 L<debhelper(1)>
68
69 This program is a part of debhelper.
70
71 =head1 AUTHOR
72
73 Joey Hess <joeyh@debian.org>
74
75 =cut