summaryrefslogtreecommitdiff
path: root/dh_gconf
diff options
context:
space:
mode:
authorjoey <joey>2004-01-13 02:38:03 +0000
committerjoey <joey>2004-01-13 02:38:03 +0000
commit4366a26a9c0c1d41597ee9f5c4b1eebaf2ac8eb3 (patch)
tree99e315022019f668255ea586ccaac11af52aecd1 /dh_gconf
parentaaa199cf6663b331be56db1dccb21c784c86344c (diff)
r1635: * Added dh_gconf command from Ross Burton. Closes: #180882
* dh_scrollkeeper: Make postinst fragment test for scrollkeeper-update. Closes: #225337 * Copyright update. * Include full text of the GPL in the source package, because goodness knows, I need another copy of that in subversion..
Diffstat (limited to 'dh_gconf')
-rwxr-xr-xdh_gconf54
1 files changed, 54 insertions, 0 deletions
diff --git a/dh_gconf b/dh_gconf
new file mode 100755
index 00000000..90ee14c3
--- /dev/null
+++ b/dh_gconf
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_gconf - generate GConf schema registration scripts
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_gconf> [S<I<debhelper options>>] [B<-p<package>>]
+
+=head1 DESCRIPTION
+
+dh_gconf is a debhelper program that is responsible for registering
+GConf schemas.
+
+It automatically generates the postinst and prerm sragments needed
+to register and unregister the schemas in etc/gconf/schemas.
+These fragements will use gconftool-2, so the package should depend on
+gconf2. This rogram will add an apprioriate dependency to ${misc:Depends}.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $tmp=tmpdir($package);
+
+ if (-d "$tmp/etc/gconf/schemas") {
+ # Get a list of the schemas
+ my $schemas = `find debian/$package/etc/gconf/schemas -type f -name \*.schemas -printf '%P '`;
+ if ($schemas ne '') {
+ autoscript($package,"postinst","postinst-gconf","s%#SCHEMAS#%$schemas%");
+ autoscript($package,"prerm","prerm-gconf","s%#SCHEMAS#%$schemas%");
+ addsubstvar($package, "misc:Depends", "gconf2 >= 2.4.0");
+ }
+ }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(1)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Ross Burton <ross@burtonini.com>
+
+=cut