5 dh_installdebconf - install files used by debconf in package build directories
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_installdebconf> [S<I<debhelper options>>] [B<-n>]
18 dh_installdebconf is a debhelper program that is responsible for installing
19 files used by the debconf package into package build directories.
21 It also automatically generates the postrm commands needed to
22 interface with debconf. See L<dh_installdeb(1)> for an explanation of how
25 Files named debian/package.config and debian/package.templates are
26 installed into the DEBIAN directory in the package build directory.
28 Note that if you use debconf, your package probably needs to depend on it.
30 =head1 LOCALIZED TEMPLATE FILES
32 Debconf also supports localized template files, and this program has some
33 support to aid working with them. You may find it easiest to keep the
34 translations in separate files, and merge them only at build time. See
35 L<debconf-mergetemplate(1)> and L<debconf-getlang(1)> for details.
37 This program will automatically call debconf-mergetemplate and merge
38 templates on the fly if it finds your template files are accompanied
39 by translated files that have the same name as the template file, with a
40 dot and a locale name repended.
42 For example, if you have a German translation,
43 debian/package.templates.de is merged with debian/package.templates.
49 =item B<-n>, B<--noscripts>
51 Do not modify postrm script.
59 foreach my $package (@{$dh{DOPACKAGES}}) {
60 my $tmp=tmpdir($package);
61 my $config=pkgfile($package,"config");
62 my $templates=pkgfile($package,"templates");
64 if (! -d "$tmp/DEBIAN") {
65 doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
69 doit("install", "-o", 0, "-g", 0, "-m", 755, "-p",
70 $config, "$tmp/DEBIAN/config");
73 if ($templates ne '') {
74 # Are there translated templates too?
75 my @trans=(glob("$templates.??"), glob("$templates.??_??"));
77 complex_doit("debconf-mergetemplate @trans $templates > $tmp/DEBIAN/templates");
78 chmod 0644, "$tmp/DEBIAN/templates";
79 chown 0, 0, "$tmp/DEBIAN/templates";
82 doit("install", "-o", 0, "-g", 0, "-m", 644, "-p",
83 $templates, "$tmp/DEBIAN/templates");
87 if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
88 autoscript($package,"postrm","postrm-debconf");
96 This program is a part of debhelper.
100 Joey Hess <joeyh@debian.org>