5 dh_gconf - generate GConf schema registration scripts
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_gconf> [S<I<debhelper options>>] [B<-p<package>>]
18 dh_gconf is a debhelper program that is responsible for registering
21 It automatically generates the postinst and prerm fragments needed
22 to register and unregister the schemas in etc/gconf/schemas.
23 These fragements will use gconftool-2, so the package should depend on
24 gconf2. This program will add an appropriate dependency to ${misc:Depends}.
26 The postinst script will also signal gconfd-2 so that the newly installed
27 schemas are available straight away.
34 foreach my $package (@{$dh{DOPACKAGES}}) {
35 my $tmp=tmpdir($package);
36 my $old_schemas_dir = "$tmp/etc/gconf/schemas";
37 my $new_schemas_dir = "$tmp/usr/share/gconf/schemas";
39 # Migrate schemas from /etc/gconf/schemas to /usr/share/gconf/schemas
40 if (-d $old_schemas_dir) {
41 doit("mkdir -p $new_schemas_dir") unless -d $new_schemas_dir;
42 doit("mv $old_schemas_dir/*.schemas $new_schemas_dir/");
43 doit("rmdir --ignore-fail-on-non-empty $old_schemas_dir");
46 if (-d "$new_schemas_dir") {
47 # Get a list of the schemas
48 my $schemas = `find $new_schemas_dir -type f -name \*.schemas -printf '%P '`;
50 autoscript($package,"postinst","postinst-gconf","s%#SCHEMAS#%$schemas%");
51 autoscript($package,"prerm","prerm-gconf","s%#SCHEMAS#%$schemas%");
52 autoscript($package,"postrm","postrm-gconf","s%#SCHEMAS#%$schemas%");
53 addsubstvar($package, "misc:Depends", "gconf2 (>= 2.6.2-1)");
62 This program is a part of debhelper.
66 Ross Burton <ross@burtonini.com>