File: Makefile.PL

package info (click to toggle)
libgnupg-interface-perl 0.36-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 412 kB
  • ctags: 50
  • sloc: perl: 1,357; makefile: 2
file content (54 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use 5.005;

use strict;
use English qw( -no_match_vars );
use ExtUtils::MakeMaker;

use File::Find;
use File::Spec;

$WARNING = 1;

my $gnupg_base = 'lib/GnuPG';
my $gnupg_install_base = "\$(INST_LIBDIR)";
my %pm_install_hash = ();

my $gpg_find = 'which gpg';
print "$gpg_find ... ";
system($gpg_find);
if ($CHILD_ERROR != 0)
{
    die "gpg (GnuPG) not found";
}

find( \&set_pm_install_hash, $gnupg_base );

sub set_pm_install_hash
{
    return unless /\.pm$/;
    
    my $install_path = $File::Find::name;
    $install_path =~ s/$gnupg_base/$gnupg_install_base/;
    $pm_install_hash{$File::Find::name} = $install_path;
}


WriteMakefile
  ( AUTHOR       => 'Frank J. Tobin',
    ABSTRACT     => 'supply object methods for interacting with GnuPG',
    NAME         => 'GnuPG::Interface',
    VERSION_FROM => File::Spec->catfile( $gnupg_base, 'Interface.pm' ),
    
    PREREQ_PM    => {
		     'Class::MethodMaker' => 1.00,
		    },
    
    PM           => { %pm_install_hash },
    
    dist         => {
		     COMPRESS => 'gzip',
		     SUFFIX   => 'gz',
		    },
    clean        => { FILES => "test/*-keys*/*.out test/random_seed test/trustdb.gpg test/temp" }
  );