|
3 | 3 | require 5.008008; |
4 | 4 | use strict; |
5 | 5 | use ExtUtils::MakeMaker; |
6 | | -use Getopt::Long qw(GetOptions); |
7 | | - |
8 | | -GetOptions(\my %opt, |
9 | | - 'aliases', |
10 | | - 'no-programs|n', |
11 | | - 'live-tests', |
12 | | -) or do { |
13 | | - die "Usage: $0 [--aliases] [--no-programs] [--live-tests]\n"; |
14 | | -}; |
15 | | - |
16 | | -my @prog; |
17 | | -push(@prog, qw(lwp-request lwp-mirror lwp-download lwp-dump)) |
18 | | - unless $opt{'no-programs'} || grep /^LIB=/, @ARGV; |
19 | | - |
20 | | -if ($opt{'aliases'} && grep(/lwp-request/, @prog)) { |
21 | | - require File::Copy; |
22 | | - for (qw(GET HEAD POST)) { |
23 | | - File::Copy::copy("bin/lwp-request", "bin/$_") || die "Can't copy bin/$_"; |
24 | | - chmod(0755, "bin/$_"); |
25 | | - push(@prog, $_); |
26 | | - } |
27 | | -} |
28 | | - |
29 | | -system($^X, "talk-to-ourself"); |
30 | | -flag_file("t/CAN_TALK_TO_OURSELF", $? == 0); |
31 | | -flag_file("t/live/ENABLED", $opt{'live-tests'}); |
32 | 6 |
|
33 | 7 | WriteMakefile( |
34 | | - NAME => 'LWP', |
35 | | - DISTNAME => 'libwww-perl', |
36 | | - VERSION_FROM => 'lib/LWP.pm', |
37 | | - ABSTRACT => 'The World-Wide Web library for Perl', |
| 8 | + NAME => 'HTTP::Daemon', |
| 9 | + VERSION_FROM => 'lib/HTTP/Daemon.pm', |
| 10 | + ABSTRACT_FROM => 'lib/HTTP/Daemon.pm', |
38 | 11 | AUTHOR => 'Gisle Aas <gisle@activestate.com>', |
39 | | - EXE_FILES => [ map "bin/$_", @prog ], |
40 | 12 | LICENSE => "perl", |
41 | 13 | MIN_PERL_VERSION => 5.008008, |
42 | 14 | PREREQ_PM => { |
43 | | - 'URI' => "1.10", |
44 | | - 'MIME::Base64' => "2.1", |
45 | | - 'Net::FTP' => "2.58", |
46 | | - 'HTML::Tagset' => 0, |
47 | | - 'HTML::Parser' => "3.33", |
48 | | - 'Digest::MD5' => 0, |
49 | | - 'Encode' => "2.12", |
50 | | - 'Encode::Locale' => 0.02, |
51 | | - 'Compress::Raw::Zlib' => 0, |
52 | | - 'IO::Compress::Gzip' => 0, |
53 | | - 'IO::Compress::Deflate' => 0, |
54 | | - 'IO::Uncompress::Gunzip' => 0, |
55 | | - 'IO::Uncompress::Inflate' => 0, |
56 | | - 'IO::Uncompress::RawInflate' => 0, |
| 15 | + 'Sys::Hostname' => 0, |
| 16 | + 'IO::Socket' => 0, |
| 17 | + 'HTTP::Request' => 6, |
| 18 | + 'HTTP::Response' => 6, |
| 19 | + 'HTTP::Status' => 6, |
| 20 | + 'HTTP::Date' => 6, |
| 21 | + 'LWP::MediaTypes' => 6, |
57 | 22 | }, |
58 | 23 | META_MERGE => { |
59 | | - recommends => { |
60 | | - 'IO::Socket::SSL' => "1.38", |
61 | | - 'Mozilla::CA' => "20110101", |
62 | | - }, |
63 | 24 | resources => { |
64 | 25 | repository => 'http://github.com/gisle/libwww-perl', |
65 | 26 | MailingList => 'mailto:libwww@perl.org', |
66 | 27 | } |
67 | 28 | }, |
68 | | - clean => { FILES => join(" ", map "bin/$_", grep /^[A-Z]+$/, @prog) }, |
69 | 29 | ); |
70 | 30 |
|
71 | | -if($] >= 5.008 && !(eval { require Encode; defined(Encode::decode("UTF-8", "\xff")) })) { |
72 | | - warn "\nYou lack a working Encode module, and so you will miss out on\n". |
73 | | - "lots of character set goodness from LWP. However, your perl is\n". |
74 | | - "sufficiently recent to support it. It is recommended that you\n". |
75 | | - "install the latest Encode from CPAN.\n\n"; |
76 | | -} |
77 | | - |
78 | | - |
79 | | - |
80 | | -sub MY::test |
81 | | -{ |
82 | | - q( |
83 | | -TEST_VERBOSE=0 |
84 | | -
|
85 | | -test : pure_all |
86 | | - $(FULLPERL) t/TEST $(TEST_VERBOSE) |
87 | | -
|
88 | | -test_hudson : pure_all |
89 | | - $(FULLPERL) t/TEST $(TEST_VERBOSE) --formatter=TAP::Formatter::JUnit |
90 | | -
|
91 | | -); |
92 | | -} |
93 | | - |
94 | | - |
95 | | -sub flag_file { |
96 | | - my($file, $create) = @_; |
97 | | - if ($create) { |
98 | | - open(my $fh, ">", $file) || die "Can't create $file: $!"; |
99 | | - } |
100 | | - else { |
101 | | - unlink($file); |
102 | | - } |
103 | | -} |
104 | 31 |
|
105 | 32 | BEGIN { |
106 | 33 | # compatibility with older versions of MakeMaker |
107 | | - my $developer = -f "NOTES.txt"; |
| 34 | + my $developer = -f ".gitignore"; |
108 | 35 | my %mm_req = ( |
109 | 36 | LICENCE => 6.31, |
110 | 37 | META_MERGE => 6.45, |
|
0 commit comments