]> git.donarmstrong.com Git - deb_pkgs/scowl.git/blobdiff - debian/wamerican.config
[svn-inject] Applying Debian modifications to trunk
[deb_pkgs/scowl.git] / debian / wamerican.config
diff --git a/debian/wamerican.config b/debian/wamerican.config
new file mode 100644 (file)
index 0000000..6fd2530
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+use Debconf::Client::ConfModule q(:all);
+
+version ('2.0');
+
+my $class          = "wordlist";
+my $script         = "/usr/share/dictionaries-common/dc-debconf-select.pl";
+my $has_elanguages = "/usr/share/dictionaries-common/elanguages";
+
+# This is not a standard dictionaries-common.config. Since dictionaries-common
+# will eventually become an optional package, we need to make sure that
+# wamerican does not run common config code unless a recent (e.g., with
+# elanguages support) dictionaries-common is installed.
+#
+# This is not a problem when the whole system is installed from scratch, but
+# can be when dictionaries-common and wamerican are upgraded together from
+# previous non elanguages dictionaries-common version. In such case $script
+# is present, so we need an extra check on $has_elanguages.
+
+if ( -e $script && -e $has_elanguages ){
+    require $script;
+    dc_debconf_select($class);
+}