summaryrefslogtreecommitdiff
path: root/dh_installmime
diff options
context:
space:
mode:
Diffstat (limited to 'dh_installmime')
-rwxr-xr-xdh_installmime22
1 files changed, 22 insertions, 0 deletions
diff --git a/dh_installmime b/dh_installmime
new file mode 100755
index 0000000..232ddc1
--- /dev/null
+++ b/dh_installmime
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
+
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+ $TMP=tmpdir($PACKAGE);
+ $mime=pkgfile($PACKAGE,"mime");
+
+ if ($mime ne '') {
+ if (! -d "$TMP/usr/lib/mime/packages") {
+ doit("install","-d","$TMP/usr/lib/mime/packages");
+ }
+ doit("install","-p","-m644",$mime,"$TMP/usr/lib/mime/packages/$PACKAGE");
+
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-mime");
+ autoscript($PACKAGE,"postrm","postrm-mime")
+ }
+ }
+}