tag 604727 + patch
thanks
Hi,
This patch add initial version of dh_gsettings.
Cheers
Laurent Bigonville
>From 982221792e9579d9b55c711f96d12f9b2f4abcc6 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bi...@debian.org>
Date: Tue, 23 Nov 2010 23:47:11 +0100
Subject: [PATCH] Add dh_gsettings program
---
dh_gsettings | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
create mode 100755 dh_gsettings
diff --git a/dh_gsettings b/dh_gsettings
new file mode 100755
index 0000000..df36394
--- /dev/null
+++ b/dh_gsettings
@@ -0,0 +1,52 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_gsettings - set appropriate dependency on GSettings backend
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_gsettings> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+B<dh_gsettings> is a debhelper program that is responsible for generating
+appropriate dependency on GSettings backend if GSettings schemas is present
+in the package.
+
+The dependency on the backend will be generated in B<${misc:Depends}>.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $tmp=tmpdir($package);
+
+ my $gsettings_schemas_dir = "$tmp/usr/share/glib-2.0/schemas/";
+
+ if (-d "$gsettings_schemas_dir") {
+ # Get a list of the schemas
+ my $schemas = `find $gsettings_schemas_dir -type f -name \\*.xml -printf '%P '`;
+ if ($schemas ne '') {
+ addsubstvar($package, "misc:Depends", "libdconf0 | gsettings-backend");
+ }
+ }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Laurent Bigonville <bi...@debian.org>
+
+=cut
--
1.7.1