summaryrefslogtreecommitdiff
path: root/dh_installdebconf
diff options
context:
space:
mode:
authorjoey <joey>2000-05-19 22:01:35 +0000
committerjoey <joey>2000-05-19 22:01:35 +0000
commit3ee57edb39dd43b944d74fc1a17e526080e3518a (patch)
tree833431d06430b197818c26f2b8cd56824e7aaa32 /dh_installdebconf
parentc9e50b9874171bc8ebed796e3f15cdf7f9161230 (diff)
r351: * dh_installdebconf: Automatically merge localized template
files. If you use this feature, you should build-depend on debconf-utils to get debconf-mergetemplate.
Diffstat (limited to 'dh_installdebconf')
-rwxr-xr-xdh_installdebconf13
1 files changed, 11 insertions, 2 deletions
diff --git a/dh_installdebconf b/dh_installdebconf
index 03ac2357..82d69d01 100755
--- a/dh_installdebconf
+++ b/dh_installdebconf
@@ -20,8 +20,17 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
if ($templates ne '') {
- doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
- $templates, "$TMP/DEBIAN/templates");
+ # Are there translated templates too?
+ my @trans=glob("$templates.??");
+ if (@trans) {
+ complex_doit("debconf-mergetemplate @trans $templates > $TMP/DEBIAN/templates");
+ chmod 0644, "$TMP/DEBIAN/templates";
+ chown 0, 0, "$TMP/DEBIAN/templates";
+ }
+ else {
+ doit("install", "-o", "root", "-g", "root", "-m", 644, "-p",
+ $templates, "$TMP/DEBIAN/templates");
+ }
}
if (($config ne ''|| $templates ne '') && ! $dh{NOSCRIPTS}) {