File: Makefile.PL

package info (click to toggle)
sendpage 1.0.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 644 kB
  • sloc: perl: 4,208; sh: 117; makefile: 51; php: 24
file content (78 lines) | stat: -rw-r--r-- 1,874 bytes parent folder | download | duplicates (2)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
use vars qw($serialport_driver $serialport_version);
BEGIN {
	require 5.006;

	# Architecture check for SerialPort driver
	$serialport_driver="Device::SerialPort";
	$serialport_version="1.0";
	if( $^O =~ /Win/io ) {
		$serialport_driver="Win32::SerialPort";
		$serialport_version="0.07";
	}
}
use ExtUtils::MakeMaker;
use strict;
use warnings;
use Config;

# Don't need these yet
#use File::Spec::Functions;
#use File::Basename;

my %args = (
	pkg_name => 'sendpage',
	name     => 'sendpage',
	DESTDIR  => undef,
);
my @pass_args;
while (my $arg = shift @ARGV) {
    my ($key, $value) = split /=/, $arg;
        if (exists $args{$key}) {
        $args{$key} = $value;
    } else {
        push @pass_args, $arg;
    }
}
@ARGV = @pass_args;


my %opts=(
    'INSTALLDIRS'   => 'site',
    'NAME'          => $args{'name'},
    'AUTHOR'        => 'Kees Cook <kees@outflux.net>',
    'VERSION_FROM'  => 'sendpage', # finds $VERSION
    'ABSTRACT_FROM' => 'sendpage',
    'EXE_FILES'     => [ qw(
    				sendpage
				snpp
				email2page
				sendmail2snpp
				sendpage-db
			) ],
    'PREREQ_PM'     => {
		'Net::SNPP' => 1.10,
		'Mail::Send' => 1.08,
		$serialport_driver => $serialport_version,		
		'DBI' => 0,
		'Test::More' => 0,
	},
);

if ($ExtUtils::MakeMaker::VERSION > 5.45) {
        $opts{'PREREQ_FATAL'} = 1,
}

# This puts us in the site_perl directory, not dependant on any version
# of perl.
if (defined($Config{'sitelib_stem'}) && $Config{'sitelib_stem'} ne "") {
        #print "stem is: $Config{'sitelib_stem'}\n";
        $opts{'INSTALLSITELIB'} = "";
        $opts{'INSTALLSITELIB'} = $args{'DESTDIR'}
                if (($] >= 5.008 && $] < 5.008005) ||
                    $ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/);
        $opts{'INSTALLSITELIB'} .= $Config{'sitelib_stem'};
}

WriteMakefile(%opts);

# /* vi:set ai ts=4 sw=4 expandtab: */