summaryrefslogtreecommitdiff
path: root/dh_installdebconf
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installdebconf')
-rwxr-xr-xdh_installdebconf31
1 files changed, 31 insertions, 0 deletions
diff --git a/dh_installdebconf b/dh_installdebconf
new file mode 100755
index 00000000..489db99a
--- /dev/null
+++ b/dh_installdebconf
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -w
+#
+# Integration with debconf.
+
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $config=pkgfile($PACKAGE,"config");
+ $templates=pkgfile($PACKAGE,"templates");
+
+ if (! -d "$TMP/DEBIAN") {
+ doit("install","-o","root","-g","root","-d","$TMP/DEBIAN");
+ }
+
+ if ($config ne '') {
+ doit("install", "-o", "root", "-g", "root", "-m", 755, "-p",
+ $config, "$TMP/DEBIAN/config");
+ }
+
+ if ($templates ne '') {
+ doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
+ $templates, "$TMP/DEBIAN/templates");
+ }
+
+ if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postrm","postrm-debconf");
+ }
+}