File: Makefile.PL

package info (click to toggle)
checkbot 1.67-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 116 kB
  • ctags: 28
  • sloc: perl: 728; makefile: 52
file content (55 lines) | stat: -rw-r--r-- 1,685 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
55
# This -*- perl -*- script makes the Makefile
# $Id: Makefile.PL,v 1.8 2001/01/14 15:26:46 graaff Exp $

require 5.004;
use ExtUtils::MakeMaker;

# chk_version from GBARR's IO Makefile.PL
sub chk_version
{
 my($pkg,$wanted,$msg) = @_;
 
 $| = 1;
 print "Checking for $pkg $wanted...";
 
 eval { my $p; ($p = $pkg . ".pm") =~ s#::#/#g; require $p; };
 
 my $vstr = ${"${pkg}::VERSION"} ? "found v" . ${"${pkg}::VERSION"}
                                 : "not found";
 my $vnum = ${"${pkg}::VERSION"} || 0;
 
 print $vnum >= $wanted ? "ok\n" : " " . $vstr . "\n";
 
 $vnum >= $wanted;
}

# Check for proper version of LWP
chk_version('LWP' => '5.50') or
  die "*** Checkbot requires LWP 5.50 or later in order to work properly\n";

chk_version('URI' => '1.07') or
  die "*** Checkbot requires URI 1.07 or later in order to work properly\n";

chk_version('HTML::Parser' => '3.10') or
  die "*** Checkbot requires HTML::Parser 3.10 or later in order to work properly\n";

# FTP should have been checked by LWP, but check anyway
chk_version('Net::FTP' => '2.00') or
  warn "*** Checkbot requires Net::FTP 2.00 or later to correctly check FTP URLs\n";

# Mail::Send is nice, but not really needed
chk_version('Mail::Send' => '1.03') or
  warn "*** Mail::Send not found. You currently can not use the --mailto option\n    of Checkbot. Mail::Send can be found in the MailTools package.\n";

# Write the Makefile
WriteMakefile(
	      NAME   => "checkbot",
	      PL_FILES  => { 'checkbot.pl' => 'checkbot' },
	      EXE_FILES => [ 'checkbot' ],
	      MAN3PODS => {},
	      PM => {},
	      VERSION_FROM => q(checkbot.pl),
	      dist => {COMPRESS => 'gzip',
		       SUFFIX => 'gz' },
);