]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1717: releasing version 4.2.21 4.2.21
authorjoey <joey>
Tue, 12 Oct 2004 18:36:14 +0000 (18:36 +0000)
committerjoey <joey>
Tue, 12 Oct 2004 18:36:14 +0000 (18:36 +0000)
autoscripts/postinst-desktop [new file with mode: 0644]
autoscripts/postrm-desktop [new file with mode: 0644]
debian/changelog
dh_desktop [new file with mode: 0644]

diff --git a/autoscripts/postinst-desktop b/autoscripts/postinst-desktop
new file mode 100644 (file)
index 0000000..ff6e6a1
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then
+       update-desktop-database -q
+fi
diff --git a/autoscripts/postrm-desktop b/autoscripts/postrm-desktop
new file mode 100644 (file)
index 0000000..38dd191
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ] && which update-desktop-database >/dev/null 2>&1 ; then
+       update-desktop-database -q
+fi
index cf3c9489b2200facb351b9884364141d5245e411..f9c39f3a6235ea5c6e10b16bff3c307c4d4c2229 100644 (file)
@@ -1,3 +1,9 @@
+debhelper (4.2.21) unstable; urgency=low
+
+  * Add dh_desktop, from Ross Burton. Closes: #275454
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 12 Oct 2004 14:31:07 -0400
+
 debhelper (4.2.20) unstable; urgency=HIGH
 
   * dpkg-cross is fixed in unstable, version the conflict. Closes: #265777
diff --git a/dh_desktop b/dh_desktop
new file mode 100644 (file)
index 0000000..8baf684
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_desktop - Register .desktop files
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_desktop> [S<I<debhelper options>>] [B<-p<package>>]
+
+=head1 DESCRIPTION
+
+dh_desktop is a debhelper program that registers .desktop files.
+Currently this program does not handle installation of the files, though it
+may do so at a later date. It takes care of adding maintainer script
+fragements to call F<update-desktop-database>.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+  my $tmp=tmpdir($package);
+
+  # Only run if there are .desktop files installed
+  if (-d "$tmp/usr/share/applications") {
+    # Get a list of the desktop files
+    my $desktop_files = `find debian/$package/ -type f -name \*.desktop -printf '%p\n'`;
+    # If there actually were some desktop files...
+    if ($desktop_files && ! $dh{NOSCRIPTS}) {
+      # Don't add a dependency on desktop-file-utils as it may not be needed
+      autoscript($package,"postinst","postinst-desktop");
+      autoscript($package,"postrm","postrm-desktop");
+    }
+  }
+}
+
+=head1 SEE ALSO
+
+L<debhelper>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Ross Burton <ross@burtonini.com>
+
+=cut