]> git.donarmstrong.com Git - debhelper.git/blob - dh_gconf
r1644: * dh_gconf: Add proper parens around the package version in the misc:Depends
[debhelper.git] / dh_gconf
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_gconf - generate GConf schema registration scripts
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_gconf> [S<I<debhelper options>>] [B<-p<package>>]
15
16 =head1 DESCRIPTION
17
18 dh_gconf is a debhelper program that is responsible for registering
19 GConf schemas.
20
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 rogram will add an apprioriate dependency to ${misc:Depends}.
25
26 =cut
27
28 init();
29
30 foreach my $package (@{$dh{DOPACKAGES}}) {
31         my $tmp=tmpdir($package);
32
33         if (-d "$tmp/etc/gconf/schemas") {
34                 # Get a list of the schemas
35                 my $schemas = `find debian/$package/etc/gconf/schemas -type f -name \*.schemas -printf '%P '`;
36                 if ($schemas ne '') {
37                         autoscript($package,"postinst","postinst-gconf","s%#SCHEMAS#%$schemas%");
38                         autoscript($package,"prerm","prerm-gconf","s%#SCHEMAS#%$schemas%");
39                         addsubstvar($package, "misc:Depends", "gconf2 (>= 2.4.0)");
40                 }
41         }
42 }
43
44 =head1 SEE ALSO
45
46 L<debhelper(7)>
47
48 This program is a part of debhelper.
49
50 =head1 AUTHOR
51
52 Ross Burton <ross@burtonini.com>
53
54 =cut