5 dh_auto_install - automatically runs make install or similar
10 use Debian::Debhelper::Dh_Lib;
11 use Debian::Debhelper::Dh_Buildsystems;
17 B<dh_auto_install> [S<I<build system options>>] [S<I<debhelper options>>] [S<B<--> I<params>>]
21 dh_auto_install is a debhelper program that tries to automatically install
22 built files. It does so by running the appropriate command for the build
23 system it detects the package uses. For example, if there's a Makefile and
24 it contains a "install" target, then this is done by running make (or MAKE,
25 if the environment variable is set). If there is a setup.py or Build.PL,
26 it is used. Note that the Ant build system does not support installation,
27 so dh_auto_install will not install files built using Ant.
29 Unless --destdir option is specified, the files are installed into
30 debian/<package>/ if there is only one binary package. In the multiple binary
31 package case, the files are instead installed into debian/tmp/, and should be
32 moved from there to the appropriate package build directory using
35 DESTDIR is used to tell make where to install the files.
36 If the Makefile was generated by MakeMaker from a Makefile.PL, it will
37 automatically set PREFIX=/usr too, since such Makefiles need that.
39 This is intended to work for about 90% of packages. If it doesn't work, or
40 tries to use the wrong install target, you're encouraged to skip using
41 dh_auto_install at all, and just run make install manually.
45 See L<debhelper(7)/BUILD SYSTEM OPTIONS> for a list of common build
46 system selection and control options.
50 =item B<--destdir=>I<directory>
52 Install files into the specified I<directory>. If this option is not specified,
53 destination directory is determined automatically as described in the
54 L</DESCRIPTION> section.
58 Pass "params" to the program that is run. These can be used to supplement
59 or override the any standard parameters that dh_auto_install passes.
67 buildsystems_init(options => {
68 "destdir=s" => \$destdir,
71 # If destdir is not specified, determine it automatically
73 my @allpackages=getpackages();
74 if (@allpackages > 1) {
75 $destdir="debian/tmp";
78 $destdir=tmpdir($dh{MAINPACKAGE});
81 $destdir = File::Spec->rel2abs($destdir, cwd());
83 buildsystems_do("install", $destdir);
89 This program is a part of debhelper.
93 Joey Hess <joeyh@debian.org>