~ubuntu-branches/ubuntu/hardy/debhelper/hardy-backports

« back to all changes in this revision

Viewing changes to dh_builddeb

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2005-03-27 11:29:01 UTC
  • Revision ID: james.westby@ubuntu.com-20050327112901-ariyj35hc24kpq7w
Tags: 4.2.32
* Patch from Fabio Tranchitella to add support for #DEBHELPER# substitutions
  in config files, although nothing in debhelper itself uses such
  substitutions, third-party addons may. Closes: #301657
* Factor out a debhelper_script_subst from dh_installdeb and
  dh_installdebconf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
=head1 SYNOPSIS
13
13
 
14
 
B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--name=>I<filename>] [S<B<--> I<params>>]
 
14
B<dh_builddeb> [S<I<debhelper options>>] [B<--destdir=>I<directory>] [B<--filename=>I<name>] [S<B<--> I<params>>]
15
15
 
16
16
=head1 DESCRIPTION
17
17
 
18
 
dh_builddeb simply calls L<dpkg(8)> to build a debian package or
 
18
dh_builddeb simply calls L<dpkg-deb(8)> to build a debian package or
19
19
packages.
20
20
 
21
21
=head1 OPTIONS
27
27
Use this if you want the generated .deb files to be put in a directory
28
28
other than the default of ".."
29
29
 
30
 
=item B<--name=>I<filename>
 
30
=item B<--filename=>I<name>
31
31
 
32
32
Use this if you want to force the generated .deb file to have a particular
33
33
file name. Does not work well if more than one .deb is generated!
36
36
 
37
37
=item B<--> I<params>
38
38
 
39
 
Pass I<params> to L<dpkg(1)|dpkg> when it is used to build the
 
39
Pass I<params> to L<dpkg-deb(1)> when it is used to build the
40
40
package.
41
41
 
42
42
=back
59
59
 
60
60
foreach my $package (@{$dh{DOPACKAGES}}) {
61
61
        my $tmp=tmpdir($package);
62
 
        doit("dpkg","--build",$tmp,"$dh{DESTDIR}$dh{FILENAME}",@{$dh{U_PARAMS}});
 
62
        if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
 
63
                complex_doit("find $tmp -name $_ | xargs rm -rf")
 
64
                        foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
 
65
        }
 
66
        if (! is_udeb($package)) {
 
67
                doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 
68
        }
 
69
        else {
 
70
                my $filename=$dh{FILENAME};
 
71
                if (! $filename) {
 
72
                        $filename="/".udeb_filename($package);
 
73
                }
 
74
                doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$filename);
 
75
        }
63
76
}
64
77
 
65
78
=head1 SEE ALSO
66
79
 
67
 
L<debhelper(1)>
 
80
L<debhelper(7)>
68
81
 
69
82
This program is a part of debhelper.
70
83