3 # Integration with debconf.
6 use Debian::Debhelper::Dh_Lib;
9 foreach my $package (@{$dh{DOPACKAGES}}) {
10 my $tmp=tmpdir($package);
11 my $config=pkgfile($package,"config");
12 my $templates=pkgfile($package,"templates");
14 if (! -d "$tmp/DEBIAN") {
15 doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
19 doit("install", "-o", 0, "-g", 0, "-m", 755, "-p",
20 $config, "$tmp/DEBIAN/config");
23 if ($templates ne '') {
24 # Are there translated templates too?
25 my @trans=(glob("$templates.??"), glob("$templates.??_??"));
27 complex_doit("debconf-mergetemplate @trans $templates > $tmp/DEBIAN/templates");
28 chmod 0644, "$tmp/DEBIAN/templates";
29 chown 0, 0, "$tmp/DEBIAN/templates";
32 doit("install", "-o", 0, "-g", 0, "-m", 644, "-p",
33 $templates, "$tmp/DEBIAN/templates");
37 if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
38 autoscript($package,"postrm","postrm-debconf");