File: Makefile.PL

package info (click to toggle)
checkbot 1.80-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 188 kB
  • ctags: 30
  • sloc: perl: 719; makefile: 32
file content (200 lines) | stat: -rw-r--r-- 4,121 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# This -*- perl -*- script makes the Makefile
# Based on the Makefile.PL in the libwww-perl distribution
# $Id: Makefile.PL 231 2007-02-26 15:51:46Z graaff $

require 5.005;
use strict;
use ExtUtils::MakeMaker;


my $missing_modules = 0;

print "\nChecking for LWP...........";
eval {
    require LWP;
    LWP->VERSION(5.803);
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
Checkbot depends on LWP (libwww-perl) for almost all actions.

EOT
    sleep(2);  # Don't hurry too much
} else {
    print " ok\n";
}
print "Checking for URI...........";
eval {
    require URI;
    URI->VERSION(1.10);
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
The URI module must be installed.  WWW without URIs would not
be that great :-)

EOT
    sleep(2);  # Don't hurry too much
} else {
    print " ok\n";
}
print "Checking for HTML::Parser..";
eval {
    require HTML::HeadParser;
    HTML::Parser->VERSION(3.33);
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
The HTML::Parser is needed to extract correct base URI information from
HTML so that we can resolve relative links correctly.  The HTML::Form
module also need HTML::TokeParser to work.

EOT
    sleep(2);  # Don't hurry too much
} else {
    print " ok\n";
}

print "Checking for MIME::Base64..";
eval {
    require MIME::Base64;
    #MIME::Base64->VERSION('2.00');
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
The Base64 encoding is used in authentication headers in HTTP.

EOT
    sleep(2);  # Don't hurry too much
} else {
    print " ok\n";
}

print "Checking for Net::FTP......";
eval {
    require Net::FTP;
    Net::FTP->VERSION('2.58');
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
The libwww-perl library normally use the Net::FTP module when
accessing ftp servers.  You would have to install this package or
configure your application to use a proxy server for making ftp
requests work.  Net::FTP is part of the 'libnet' distribution.

EOT
    sleep(2);  # Don't hurry too much
} else {
    print " ok\n";
}

print "Checking for Digest::MD5 ..";
eval {
    require Digest::MD5;
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@
The Digest::MD5 library is needed if you want to be able use the
experimental "Digest Access Authentication" scheme.  Since very few
servers implement this authentication scheme, you should normally not
worry too much about this.

EOT
} else {
    print " ok\n";
}

print "Checking for Mail::Send ..";
eval {
    require Mail::Send;
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@ 

Mail::Send is used to allow Checkbot to send email. You currently
can not use the --mailto option of Checkbot. Mail::Send can be found
in the MailTools package.

EOT
} else {
    print " ok\n";
}

print "Checking for Time::Duration ..";
eval {
    require Time::Duration;
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@ 

Time::Duration is used to display information on elapsed time in the
reports. If Time::Duration is not available Checkbot will still work,
but this information is not printed in the report.

EOT
} else {
    print " ok\n";
}

print "Checking for Net::SSL ..";
eval {
    require Net::SSL;
};
if ($@) {
    print " failed\n";
    $missing_modules++;
    print <<EOT;
$@ 

Net::SSL is used to check https links. If Net::SSL is not available
Checkbot will still work, but it is not possible to check https://
links. Net::SSL is part of the Crypt::SSLeay package. Note that this
package in turn depends on the openssl tools.

EOT
} else {
    print " ok\n";
}
print <<EOT if $missing_modules;
The missing modules can be obtained from CPAN.  Visit
<URL:http://www.perl.com/CPAN/> to find a CPAN site near you.

EOT

print "\n";

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