5 dh_gconf - install GConf defaults files and register schemas
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_gconf> [S<I<debhelper options>>] [B<--priority=>I<priority>]
18 B<dh_gconf> is a debhelper program that is responsible for installing GConf
19 defaults files and registering GConf schemas.
21 An appropriate dependency on gconf2 will be generated in B<${misc:Depends}>.
27 =item debian/I<package>.gconf-defaults
29 Installed into F<usr/share/gconf/defaults/10_package> in the package build
30 directory, with I<package> replaced by the package name.
32 =item debian/I<package>.gconf-mandatory
34 Installed into F<usr/share/gconf/mandatory/10_package> in the package build
35 directory, with I<package> replaced by the package name.
43 =item B<--priority> I<priority>
45 Use I<priority> (which should be a 2-digit number) as the defaults
46 priority instead of B<10>. Higher values than ten can be used by
47 derived distributions (B<20>), CDD distributions (B<50>), or site-specific
57 if (defined $dh{PRIORITY}) {
58 $priority=$dh{PRIORITY};
61 foreach my $package (@{$dh{DOPACKAGES}}) {
62 my $tmp=tmpdir($package);
65 my $mandatory = pkgfile($package, "gconf-mandatory");
66 if ($mandatory ne '') {
67 doit("mkdir","-p","$tmp/usr/share/gconf/mandatory");
68 doit("install","-p","-m644",$mandatory,"$tmp/usr/share/gconf/mandatory/${priority}_$package");
69 addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)");
72 my $defaults = pkgfile($package,"gconf-defaults");
73 if ($defaults ne '') {
74 doit("mkdir","-p","$tmp/usr/share/gconf/defaults");
75 doit("install","-p","-m644",$defaults,"$tmp/usr/share/gconf/defaults/${priority}_$package");
76 addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)") unless $gconf_dep;
80 my $old_schemas_dir = "$tmp/etc/gconf/schemas";
81 my $new_schemas_dir = "$tmp/usr/share/gconf/schemas";
83 # Migrate schemas from /etc/gconf/schemas to /usr/share/gconf/schemas
84 if (-d $old_schemas_dir) {
85 doit("mkdir -p $new_schemas_dir") unless -d $new_schemas_dir;
86 doit("mv $old_schemas_dir/*.schemas $new_schemas_dir/");
87 doit("rmdir -p --ignore-fail-on-non-empty $old_schemas_dir");
90 if (-d "$new_schemas_dir") {
91 # Get a list of the schemas
92 my $schemas = `find $new_schemas_dir -type f -name \\*.schemas -printf '%P '`;
94 addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)") unless $gconf_dep;
103 This program is a part of debhelper.
107 Ross Burton <ross@burtonini.com>
108 Josselin Mouette <joss@debian.org>