]> git.donarmstrong.com Git - debhelper.git/blob - dh_installdebconf
r338: * Patch from Jorgen `forcer' Schaefer <forcer at mindless.com> (much
[debhelper.git] / dh_installdebconf
1 #!/usr/bin/perl -w
2 #
3 # Integration with debconf.
4
5 use Debian::Debhelper::Dh_Lib;
6 init();
7
8 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
9         $TMP=tmpdir($PACKAGE);
10         $config=pkgfile($PACKAGE,"config");
11         $templates=pkgfile($PACKAGE,"templates");
12
13         if (! -d "$TMP/DEBIAN") {
14                 doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
15         }
16
17         if ($config ne '') {
18                 doit("install", "-o", "root", "-g", "root", "-m", 755, "-p",
19                      $config, "$TMP/DEBIAN/config");
20         }
21         
22         if ($templates ne '') {
23                 doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
24                      $templates, "$TMP/DEBIAN/templates");
25         }
26
27         if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
28                 autoscript($PACKAGE,"postrm","postrm-debconf");
29         }
30 }