summaryrefslogtreecommitdiff
path: root/dh_installmime
blob: 232ddc19e1fe99de96223b35f247bd9e24e06f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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")
		}
	}
}