]> git.donarmstrong.com Git - debhelper.git/blob - dh_builddeb
r431: pod over for the night
[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
38 =item B<--> I<params>
39
40 Pass I<params> to L<dpkg(1)|dpkg> when it is used to build the
41 package.
42
43 =back
44
45 =cut
46
47 init();
48
49 # Set the default destination directory.
50 if (! defined $dh{DESTDIR}) {
51         $dh{DESTDIR}='..';
52 }
53
54 if (! defined $dh{FILENAME}) {
55         $dh{FILENAME}='';
56 }
57 else {
58         $dh{FILENAME}="/$dh{FILENAME}";
59 }
60
61 foreach my $package (@{$dh{DOPACKAGES}}) {
62         my $tmp=tmpdir($package);
63         doit("dpkg","--build",$tmp,"$dh{DESTDIR}$dh{FILENAME}",@{$dh{U_PARAMS}});
64 }
65
66 =head1 SEE ALSO
67
68 L<debhelper(1)>
69
70 This program is a part of debhelper.
71
72 =head1 AUTHOR
73
74 Joey Hess <joeyh@debian.org>
75
76 =cut