]> git.donarmstrong.com Git - debhelper.git/blob - dh_installdebconf
r284: * Enhanced debconf support -- the database is now cleaned up on package
[debhelper.git] / dh_installdebconf
1 #!/usr/bin/perl -w
2 #
3 # Integration with debconf.
4
5 BEGIN { push @INC, "debian", "/usr/share/debhelper" }
6 use Dh_Lib;
7 init();
8
9 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
10         $TMP=tmpdir($PACKAGE);
11         $config=pkgfile($PACKAGE,"config");
12         $templates=pkgfile($PACKAGE,"templates");
13
14         if (! -d "$TMP/DEBIAN") {
15                 doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
16         }
17
18         if ($config ne '') {
19                 doit("install", "-o", "root", "-g", "root", "-m", 755, "-p",
20                      $config, "$TMP/DEBIAN/config");
21         }
22         
23         if ($templates ne '') {
24                 doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
25                      $templates, "$TMP/DEBIAN/templates");
26         }
27
28         if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
29                 autoscript($PACKAGE,"postrm","postrm-debconf");
30         }
31 }