5 dh_installmime - install mime files into package build directories
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_installmime> [S<I<debhelper options>>] [B<-n>]
18 dh_installmime is a debhelper program that is responsible for installing
19 mime files into package build directories.
21 It also automatically generates the postinst and postrm commands needed to
22 interface with the debian mime-support package. See L<dh_installdeb(1)> for
23 an explanation of how this works.
25 If a file named debian/package.mime exists, then it is installed into
26 usr/lib/mime/packages/package in the package build directory.
32 =item B<-n>, B<--noscripts>
34 Do not modify postinst/postrm scripts.
40 Note that this command is not idempotent. "dh_clean -k" should be called
41 between invocations of this command. Otherwise, it may cause multiple
42 instances of the same text to be added to maintainer scripts.
48 foreach my $package (@{$dh{DOPACKAGES}}) {
49 my $tmp=tmpdir($package);
50 my $mime=pkgfile($package,"mime");
53 if (! -d "$tmp/usr/lib/mime/packages") {
54 doit("install","-d","$tmp/usr/lib/mime/packages");
56 doit("install","-p","-m644",$mime,"$tmp/usr/lib/mime/packages/$package");
58 if (! $dh{NOSCRIPTS}) {
59 autoscript($package,"postinst","postinst-mime");
60 autoscript($package,"postrm","postrm-mime")
69 This program is a part of debhelper.
73 Joey Hess <joeyh@debian.org>