summaryrefslogtreecommitdiff
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
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.
-rw-r--r--autoscripts/postrm-debconf4
-rw-r--r--debian/changelog9
-rwxr-xr-xdh_installdeb4
-rw-r--r--dh_installdeb.12
-rwxr-xr-xdh_installdebconf31
-rw-r--r--dh_installdebconf.140
-rwxr-xr-xexamples/rules1
-rwxr-xr-xexamples/rules.indep1
-rwxr-xr-xexamples/rules.multi2
-rwxr-xr-xexamples/rules.multi21
10 files changed, 91 insertions, 4 deletions
diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf
new file mode 100644
index 00000000..2b79156f
--- /dev/null
+++ b/autoscripts/postrm-debconf
@@ -0,0 +1,4 @@
+if [ "$1" = purge -a -e /usr/share/debconf/confmodule.sh ]; then
+ . /usr/share/debconf/confmodule.sh
+ db_purge
+fi
diff --git a/debian/changelog b/debian/changelog
index 0e96a2e3..c5056f85 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+debhelper (2.0.54) unstable; urgency=low
+
+ * 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.
+
+ -- Joey Hess <joeyh@master.debian.org> Tue, 28 Sep 1999 16:12:53 -0700
+
debhelper (2.0.53) unstable; urgency=low
* Minor changes to rules.multi2.
diff --git a/dh_installdeb b/dh_installdeb
index fa45cd6f..d3eebe76 100755
--- a/dh_installdeb
+++ b/dh_installdeb
@@ -16,7 +16,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# Install debian install scripts.
# If any .debhelper files exist, add them into the scripts.
- foreach $file (qw{postinst preinst prerm postrm config}) {
+ foreach $file (qw{postinst preinst prerm postrm}) {
$f=pkgfile($PACKAGE,$file);
if ($f) {
if (-f "debian/$EXT$file.debhelper") {
@@ -46,7 +46,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
# Install non-executable files
- foreach $file (qw{shlibs conffiles templates}) {
+ foreach $file (qw{shlibs conffiles}) {
$f=pkgfile($PACKAGE,$file);
if ($f) {
doit("install","-o","root","-g","root","-m",644,"-p",$f,"$TMP/DEBIAN/$file");
diff --git a/dh_installdeb.1 b/dh_installdeb.1
index d0f81487..0ae45641 100644
--- a/dh_installdeb.1
+++ b/dh_installdeb.1
@@ -17,8 +17,6 @@ the DEBIAN directory:
prerm
shlibs
conffiles
- config
- templates
.P
(For packages other than the first binary package listed in debian/control,
you must prefix these filenames with then name of the "package.", for example,
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");
+ }
+}
diff --git a/dh_installdebconf.1 b/dh_installdebconf.1
new file mode 100644
index 00000000..3249502a
--- /dev/null
+++ b/dh_installdebconf.1
@@ -0,0 +1,40 @@
+.TH DH_INSTALLDEBCONF 1 "" "Debhelper Commands" "Debhelper Commands"
+.SH NAME
+dh_installdebconf \- install debconf files into package build directories
+.SH SYNOPSIS
+.B dh_installdebconf
+.I "[debhelper options] [-n]"
+.SH "DESCRIPTION"
+dh_installdebconf is a debhelper program that is responsible for installing
+files used by the debconf package into package build directories.
+.P
+It also automatically generates the postrm commands needed to
+interface with debconf. See
+.BR dh_installdeb (1)
+for an explanation of how this works.
+.P
+Files named debian/package.config and debian/package.templates are installed
+into the DEBIAN directory in the package build directory.
+.P
+For the first first binary package listed in the control file, you may use
+debian/config and debian/templates instead.
+.P
+Note that if you use debconf, your package probably needs to depend on it.
+.SH OPTIONS
+.TP
+.B debhelper options
+See
+.BR debhelper (1)
+for a list of options common to all debhelper commands.
+.TP
+.B \-n, \--noscripts
+Do not modify postrm script.
+.SH ENVIRONMENT
+See
+.BR debhelper (1)
+for a list of environment variables that affect all debhelper commands.
+.SH "SEE ALSO"
+.TP
+.BR debhelper (1)
+.SH AUTHOR
+Joey Hess <joeyh@master.debian.org>
diff --git a/examples/rules b/examples/rules
index 926c38c6..d24c2b8f 100755
--- a/examples/rules
+++ b/examples/rules
@@ -49,6 +49,7 @@ binary-arch: build install
# dh_testversion
dh_testdir
dh_testroot
+# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
diff --git a/examples/rules.indep b/examples/rules.indep
index 55802f31..ecda654a 100755
--- a/examples/rules.indep
+++ b/examples/rules.indep
@@ -47,6 +47,7 @@ binary-indep: build install
# dh_testversion
dh_testdir
dh_testroot
+# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
diff --git a/examples/rules.multi b/examples/rules.multi
index bd8aa31e..c3b1bd1a 100755
--- a/examples/rules.multi
+++ b/examples/rules.multi
@@ -57,6 +57,7 @@ binary-indep: build install
dh_testversion 1.1.17
dh_testdir
dh_testroot
+# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
@@ -87,6 +88,7 @@ binary-arch: build install
dh_testversion 1.1.17
dh_testdir
dh_testroot
+# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
diff --git a/examples/rules.multi2 b/examples/rules.multi2
index 803c9ecf..871c41c7 100755
--- a/examples/rules.multi2
+++ b/examples/rules.multi2
@@ -56,6 +56,7 @@ binary-common:
dh_testversion 1.1.17
dh_testdir
dh_testroot
+# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu