-
- if (! $dh{NOSCRIPTS}) {
- autoscript($package,"postinst","postinst-mime");
- autoscript($package,"postrm","postrm-mime")
+ }
+ # Check whether we have to call update-mime (either upstream already
+ # installs a MIME information file or Debian provides one)
+ if ((! $dh{NOSCRIPTS}) && (-d "$tmp/usr/lib/mime/packages")) {
+ autoscript($package,"postinst","postinst-mime");
+ autoscript($package,"postrm","postrm-mime")
+ }
+
+ my $sharedmimeinfo=pkgfile($package,"sharedmimeinfo");
+
+ if ($sharedmimeinfo ne '') {
+ if (! -d "$tmp/usr/share/mime/packages") {
+ doit("install", "-d", "$tmp/usr/share/mime/packages");