summaryrefslogtreecommitdiff
path: root/dh_installmime
blob: 7cada574762b86b44349556eea2fd0f8e23d796a (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/share/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")
		}
	}
}