summaryrefslogtreecommitdiff
path: root/dh_installdebconf
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installdebconf')
-rwxr-xr-xdh_installdebconf14
1 files changed, 12 insertions, 2 deletions
diff --git a/dh_installdebconf b/dh_installdebconf
index 5833fbc..9dc13bb 100755
--- a/dh_installdebconf
+++ b/dh_installdebconf
@@ -25,7 +25,8 @@ that works.
Files named debian/package.config and debian/package.templates are
installed into the DEBIAN directory in the package build directory.
-Note that if you use debconf, your package probably needs to depend on it.
+Note that if you use debconf, your package probably needs to depend on it
+(it will be added to ${misc:Depends by this program).
=head1 LOCALIZED TEMPLATE FILES
@@ -84,7 +85,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
- if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {
+ if ($config ne '' || $templates ne '') {
+ # I'm going with debconf 0.5 because it was the first
+ # "modern" one.
+ addsubstvar($package, "misc:Depends", "debconf", ">= 0.5");
+ }
+ else {
+ addsubstvar($package, "misc:Depends", "debconf", ">= 0.5", 1); # remove
+ }
+
+ if (($config ne '' || $templates ne '') && ! $dh{NOSCRIPTS}) {
autoscript($package,"postrm","postrm-debconf");
}
}