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