summaryrefslogtreecommitdiff
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
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.
-rw-r--r--debian/changelog8
-rwxr-xr-xdh_installdebconf13
-rw-r--r--dh_installdebconf.117
3 files changed, 36 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 31dde712..10091298 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (2.0.98) unstable; urgency=low
+
+ * dh_installdebconf: Automatically merge localized template
+ files. If you use this feature, you should build-depend on
+ debconf-utils to get debconf-mergetemplate.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 19 May 2000 14:24:24 -0700
+
debhelper (2.0.97) unstable; urgency=low
* dh_installinfo: changed test to see if an info file is the head file to
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}) {
diff --git a/dh_installdebconf.1 b/dh_installdebconf.1
index 176d61aa..b423679c 100644
--- a/dh_installdebconf.1
+++ b/dh_installdebconf.1
@@ -20,6 +20,23 @@ 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 "LOCALIZED TEMPLATE FILES"
+Debconf also supports localized template files, and this program has some
+support to aid working with them. You may find it easiest to keep the
+translations in separate files, and merge them only at build time. See
+.BR debconf-mergetemplate (1)
+for details.
+.P
+This program will automatically call
+.BR debconf-mergetemplate (1)
+and merge templates on the fly if it finds your template files are accompnied
+by translated files that have the same name as the template file, with a
+dot and two letters prepended.
+.P
+For example, if you have a German translation,
+debian/templates.de is merged with debian/templates.
+.P
+If you use this feature, your package should build-depend on debconf-utils.
.SH OPTIONS
.TP
.B debhelper options