]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_gconf
Updated French man page translation. Closes: #685560
[debhelper.git] / dh_gconf
index 6275b734cd1bd3cdae6971fa72f56efa076ade61..1f3070e3dc0b899a1c8234e00c154fd0d2184018 100755 (executable)
--- a/dh_gconf
+++ b/dh_gconf
@@ -2,7 +2,7 @@
 
 =head1 NAME
 
-dh_gconf - generate GConf schema registration scripts
+dh_gconf - install GConf defaults files and register schemas
 
 =cut
 
@@ -11,34 +11,30 @@ use Debian::Debhelper::Dh_Lib;
 
 =head1 SYNOPSIS
 
-B<dh_gconf> [S<I<debhelper options>>] [B<-p<package>>]
+B<dh_gconf> [S<I<debhelper options>>] [B<--priority=>I<priority>]
 
 =head1 DESCRIPTION
 
-dh_gconf is a debhelper program that is responsible for registering
-GConf schemas.
+B<dh_gconf> is a debhelper program that is responsible for installing GConf
+defaults files and registering GConf schemas.
 
-It automatically generates the postinst and prerm fragments needed
-to register and unregister the schemas in usr/share/gconf/schemas, using
-gconf-schemas.
+An appropriate dependency on gconf2 will be generated in B<${misc:Depends}>.
 
-If a file named debian/package.gconf-defaults exists, then it is
-installed into usr/share/gconf/defaults/10_package in the package build
-directory, with "package" replaced by the package name. Some postinst and
-postrm fragments will be generated to launch update-gconf-defaults. The
-syntax of this file consists of lines containing the key name, some
-white space, and the key value, which can be an integer, a boolean, a
-float, a string or a list of strings. Example:
+=head1 FILES
 
-  /apps/myprogram/frob_number  42
-  /apps/myprogram/do_foo       true
-  /apps/myprogram/priority     1.25
-  /apps/myprogram/name         "Gotcha !"
-  /apps/myprogram/names                [Ha ha!,Let's keep serious,Ho ho!]
+=over 4
+
+=item debian/I<package>.gconf-defaults
+
+Installed into F<usr/share/gconf/defaults/10_package> in the package build
+directory, with I<package> replaced by the package name.
+
+=item debian/I<package>.gconf-mandatory
 
-The gconf-schemas and update-gconf-defaults scripts are provided by the
-gconf2 package. An appropriate dependency will be generated in
-${misc:Depends}.
+Installed into F<usr/share/gconf/mandatory/10_package> in the package build
+directory, with I<package> replaced by the package name.
+
+=back
 
 =head1 OPTIONS
 
@@ -47,9 +43,11 @@ ${misc:Depends}.
 =item B<--priority> I<priority>
 
 Use I<priority> (which should be a 2-digit number) as the defaults
-priority instead of 10. Children distributions are encouraged to use 20
-for their branding, CDD distributions to use 50, and site-specific
-packages should use 90 or more.
+priority instead of B<10>. Higher values than ten can be used by 
+derived distributions (B<20>), CDD distributions (B<50>), or site-specific
+packages (B<90>).
+
+=back
 
 =cut
 
@@ -64,13 +62,18 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
        
        my $gconf_dep = 0;
+       my $mandatory = pkgfile($package, "gconf-mandatory");
+       if ($mandatory ne '') {
+               doit("mkdir","-p","$tmp/usr/share/gconf/mandatory");
+               doit("install","-p","-m644",$mandatory,"$tmp/usr/share/gconf/mandatory/${priority}_$package");
+               addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)");
+               $gconf_dep = 1;
+       }
        my $defaults = pkgfile($package,"gconf-defaults");
        if ($defaults ne '') {
                doit("mkdir","-p","$tmp/usr/share/gconf/defaults");
                doit("install","-p","-m644",$defaults,"$tmp/usr/share/gconf/defaults/${priority}_$package");
-               autoscript($package,"postinst","postinst-gconf-defaults");
-               autoscript($package,"postrm","postrm-gconf-defaults");
-               addsubstvar($package, "misc:Depends", "gconf2 (>= 2.12.1-1)");
+               addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)") unless $gconf_dep;
                $gconf_dep = 1;
        }
 
@@ -88,10 +91,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # Get a list of the schemas
                my $schemas = `find $new_schemas_dir -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%");
-                       autoscript($package,"postrm","postrm-gconf","s%#SCHEMAS#%$schemas%");
-                       addsubstvar($package, "misc:Depends", "gconf2 (>= 2.10.1-2)") unless $gconf_dep;
+                       addsubstvar($package, "misc:Depends", "gconf2 (>= 2.28.1-2)") unless $gconf_dep;
                }
        }
 }