summaryrefslogtreecommitdiff
path: root/dh_installmime
blob: 59d8c87310174ffff98a37b45b0dd74c5653402d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w
#
# Mime support.

use strict;
use Debian::Debhelper::Dh_Lib;
init();

foreach my $package (@{$dh{DOPACKAGES}}) {
	my $tmp=tmpdir($package);
	my $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")
		}
	}
}