]> git.donarmstrong.com Git - debhelper.git/blob - dh_installpam
r1596: * Remove duplicate packages from DOPACKAGES after argument processing.
[debhelper.git] / dh_installpam
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_installpam - install pam support files
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_installpam> [S<I<debhelper options>>] [B<--name=>I<name>]
15
16 =head1 DESCRIPTION
17
18 dh_installpam is a debhelper program that is responsible for installing
19 files used by PAM into package build directories.
20
21 If a file named debian/package.pam exists, then it is installed into
22 etc/pam.d/package in the package build directory.
23
24 =head1 OPTIONS
25
26 =over 4
27
28 =item B<--name=>I<name>
29
30 Look for files named debian/package.name.pam and install them as
31 etc/pam.d/name, instead of using the usual files and installing them as
32 the package name.
33
34 =back
35
36 =cut
37
38 init();
39
40 foreach my $package (@{$dh{DOPACKAGES}}) {
41         my $tmp=tmpdir($package);
42         my $pam=pkgfile($package,"pam");
43         
44         if ($pam ne '') {
45                 if (! -d "$tmp/etc/pam.d") {
46                         doit("install","-d","$tmp/etc/pam.d");
47                 }
48                 doit("install","-p","-m644",$pam,"$tmp/etc/pam.d/".pkgfilename($package));
49         }
50 }
51
52 =head1 SEE ALSO
53
54 L<debhelper(7)>
55
56 This program is a part of debhelper.
57
58 =head1 AUTHOR
59
60 Joey Hess <joeyh@debian.org>
61
62 =cut