summaryrefslogtreecommitdiff
path: root/dh_installdebconf
diff options
context:
space:
mode:
authorjoey <joey>1999-09-29 00:09:42 +0000
committerjoey <joey>1999-09-29 00:09:42 +0000
commita9b331f789c412236016303e21b4abfb83f9aa62 (patch)
tree7feb991bfd38b03a2254a8f52a61f697ce2fe67c /dh_installdebconf
parent3b8ba525e95675349ed84bb3e453f36f81cf5134 (diff)
r284: * Enhanced debconf support -- the database is now cleaned up on package
purge. * Broke all debconf support off into a dh_installdebconf script. This seems conceptually a little cleaner.
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 0000000..489db99
--- /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");
+ }
+}