-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");
- }
- }
-}