5 dh_desktop - Register .desktop files
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_desktop> [S<I<debhelper options>>] [B<-p<package>>]
18 dh_desktop is a debhelper program that registers .desktop files.
19 Currently this program does not handle installation of the files, though it
20 may do so at a later date. It takes care of adding maintainer script
21 fragements to call F<update-desktop-database>.
27 foreach my $package (@{$dh{DOPACKAGES}}) {
28 my $tmp=tmpdir($package);
30 # Only run if there are .desktop files installed
31 if (-d "$tmp/usr/share/applications") {
32 # Get a list of the desktop files
33 my $desktop_files = `find debian/$package/ -type f -name \*.desktop -printf '%p\n'`;
34 # If there actually were some desktop files...
35 if ($desktop_files && ! $dh{NOSCRIPTS}) {
36 # Don't add a dependency on desktop-file-utils as it may not be needed
37 autoscript($package,"postinst","postinst-desktop");
38 autoscript($package,"postrm","postrm-desktop");
47 This program is a part of debhelper.
51 Ross Burton <ross@burtonini.com>