5 dh_installdeb - install files into the DEBIAN directory
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_installdeb> [S<I<debhelper options>>]
18 dh_installdeb is a debhelper program that is responsible for installing
19 files into the DEBIAN directories in package build directories with the
26 =item I<package>.postinst
28 =item I<package>.preinst
30 =item I<package>.postrm
32 =item I<package>.prerm
34 These maintainer scripts are installed into the DEBIAN directory.
36 Inside the scripts, the token B<#DEBHELPER#> is replaced with
37 shell script snippets generated by other debhelper commands.
39 =item I<package>.triggers
41 =item I<package>.shlibs
43 These control files are installed into the DEBIAN directory.
45 =item I<package>.conffiles
47 This control file will be installed into the DEBIAN directory.
49 In V3 compatibility mode and higher, all files in the etc/ directory in a
50 package will automatically be flagged as conffiles by this program, so
51 there is no need to list them manually here.
59 foreach my $package (@{$dh{DOPACKAGES}}) {
60 my $tmp=tmpdir($package);
62 if (! -d "$tmp/DEBIAN") {
63 doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
66 if (is_udeb($package)) {
67 # For udebs, only do the postinst, and no #DEBHELPER#.
68 # Udebs also support menutest and isinstallable scripts.
69 foreach my $script (qw{postinst menutest isinstallable}) {
70 my $f=pkgfile($package,$script);
72 doit("install", "-o", 0, "-g", 0, "-m", 755,
73 $f, "$tmp/DEBIAN/$script");
79 # Install debian scripts.
80 foreach my $script (qw{postinst preinst prerm postrm}) {
81 debhelper_script_subst($package, $script);
84 if (! is_udeb($package)) {
85 # Install non-executable files
86 foreach my $file (qw{shlibs conffiles triggers}) {
87 my $f=pkgfile($package,$file);
89 doit("install","-o",0,"-g",0,"-m",644,"-p",$f,"$tmp/DEBIAN/$file");
94 # Automatic conffiles registration: If it is in /etc, it is a
96 if (! compat(2) && -d "$tmp/etc" && ! is_udeb($package)) {
97 complex_doit("find $tmp/etc -type f -printf '/etc/%P\n' >> $tmp/DEBIAN/conffiles");
99 if (-z "$tmp/DEBIAN/conffiles") {
100 doit("rm", "-f", "$tmp/DEBIAN/conffiles");
103 doit("chmod", 644, "$tmp/DEBIAN/conffiles");
112 This program is a part of debhelper.
116 Joey Hess <joeyh@debian.org>