X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_gconf;h=514aae7972ba2d32db07214412a59b13cad586fe;hb=22272aacfd9a988e722ba3fcb9b93432f5a1e29a;hp=bd743428348aba3ccddef9ed05b478da5fdad731;hpb=29add35a30e5b0aeb2d23b3e2d4b7a05c97c535f;p=debhelper.git diff --git a/dh_gconf b/dh_gconf index bd74342..514aae7 100755 --- a/dh_gconf +++ b/dh_gconf @@ -11,7 +11,7 @@ use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS -B [S>] [B<-p>] +B [S>] [B<--priority=>] =head1 DESCRIPTION @@ -19,20 +19,73 @@ dh_gconf is a debhelper program that is responsible for registering GConf schemas. It automatically generates the postinst and prerm fragments needed -to register and unregister the schemas in usr/share/gconf/schemas. -These fragments will use gconftool-2, so the package should depend on -gconf2. This program will add an appropriate dependency to ${misc:Depends}. +to register and unregister the schemas in usr/share/gconf/schemas, using +gconf-schemas. -The postinst script will also signal gconfd-2 so that the newly installed -schemas are available straight away. +An appropriate dependency on gconf2 will be generated in ${misc:Depends}. + +=head1 FILES + +=over 4 + +=item debian/I.gconf-defaults + +Installed into usr/share/gconf/defaults/10_package in the package build +directory, with "I" replaced by the package name. Some postinst +and postrm fragments will be generated to run update-gconf-defaults. + +=item debian/I.gconf-mandatory + +Installed into usr/share/gconf/mandatory/10_package in the package build +directory, with "I" replaced by the package name, and similar +postinst and postrm fragments will be generated. + +=back + +=head1 OPTIONS + +=over 4 + +=item B<--priority> I + +Use I (which should be a 2-digit number) as the defaults +priority instead of 10. Higher values than ten can be used by +derived distributions (20), CDD distributions (50), or site-specific +packages (90). + +=back =cut init(); +my $priority=10; +if (defined $dh{PRIORITY}) { + $priority=$dh{PRIORITY}; +} 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"); + autoscript($package,"postinst","postinst-gconf-defaults","s%#OPT#%--mandatory%"); + addsubstvar($package, "misc:Depends", "gconf2 (>= 2.24.0-5)"); + $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","s%#OPT#%%"); + autoscript($package,"postrm","postrm-gconf-defaults","s%#OPT#%%"); + addsubstvar($package, "misc:Depends", "gconf2 (>= 2.12.1-1)") unless $gconf_dep; + $gconf_dep = 1; + } + my $old_schemas_dir = "$tmp/etc/gconf/schemas"; my $new_schemas_dir = "$tmp/usr/share/gconf/schemas"; @@ -49,8 +102,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { 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)"); + addsubstvar($package, "misc:Depends", "gconf2 (>= 2.10.1-2)") unless $gconf_dep; } } } @@ -64,5 +116,6 @@ This program is a part of debhelper. =head1 AUTHOR Ross Burton +Josselin Mouette =cut