]> git.donarmstrong.com Git - debhelper.git/blob - dh_auto_install
fix pod oops
[debhelper.git] / dh_auto_install
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_auto_install - automatically runs make install or similar
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11 use Debian::Debhelper::Dh_Buildsystems;
12 use Cwd;
13
14 =head1 SYNOPSIS
15
16 B<dh_auto_install> [S<I<build system options>>] [S<I<debhelper options>>] [S<B<--> I<params>>]
17
18 =head1 DESCRIPTION
19
20 dh_auto_install is a debhelper program that tries to automatically install
21 built files. It does so by running the appropriate command for the build
22 system it detects the package uses. For example, if there's a Makefile and
23 it contains a "install" target, then this is done by running make (or MAKE,
24 if the environment variable is set). If there is a setup.py or Build.PL,
25 it is used.
26
27 The files are installed into debian/<package>/ if there is only one binary
28 package. In the multiple binary package case, the files are instead
29 installed into debian/tmp/, and should be moved from there to the
30 appropriate package build directory using L<dh_install(1)>.
31
32 DESTDIR is used to tell make where to install the files. 
33 If the Makefile was generated by MakeMaker from a Makefile.PL, it will
34 automatically set PREFIX=/usr too, since such Makefiles need that.
35
36 This is intended to work for about 90% of packages. If it doesn't work, or
37 tries to use the wrong install target, you're encouraged to skip using
38 dh_auto_install at all, and just run make install manually.
39
40 =head1 OPTIONS
41
42 See L<debhelper(7)/BUILD SYSTEM OPTIONS> for a list of common build
43 system selection and control options.
44
45 =over 4
46
47 =item B<--> I<params>
48
49 Pass "params" to the program that is run. These can be used to supplement
50 or override the any standard parameters that dh_auto_install passes.
51
52 =back
53
54 =cut
55
56 buildsystems_init();
57
58 my $destdir;
59 my @allpackages=getpackages();
60 if (@allpackages > 1) {
61         $destdir="debian/tmp";
62 }
63 else {
64         $destdir=tmpdir($dh{MAINPACKAGE});
65 }
66 $destdir=cwd()."/".$destdir;
67
68 buildsystems_do("install", $destdir);
69
70 =head1 SEE ALSO
71
72 L<debhelper(7)>
73
74 This program is a part of debhelper.
75
76 =head1 AUTHOR
77
78 Joey Hess <joeyh@debian.org>
79
80 =cut