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
|
#!/usr/bin/perl
# $Id: Makefile.PL,v 1.20 2004/02/23 23:24:31 rcaputo Exp $
use strict;
use lib qw(./mylib);
use ExtUtils::MakeMaker;
use ExtUtils::AutoInstall;
# Touch CHANGES so it exists.
open(CHANGES, ">>CHANGES") and close CHANGES;
my %prereq = (
'POE' => 0.27,
'HTTP::Request' => 1.30,
'HTTP::Response' => 1.37,
'URI' => 1.24,
'HTML::Parser' => 3.33, # For HTML::HeadParser
);
# Prompt for optional things.
ExtUtils::AutoInstall->import
( -version => '0.54',
-core => [ %prereq ],
"Optional modules for SSL support." =>
[ -default => 0,
'Net::SSLeay' => 1.17,
'Net::SSLeay::Handle' => 0.61,
],
);
# MakeMaker doesn't know about arch :(
sub MY::libscan {
my ($self, $path) = @_;
my ($dirs,$file) = ($self->splitpath($path))[1,2];
return '' if grep /^(?:\.arch-ids|{arch}|,,.*|\+\+.*)$/,
$self->splitdir($dirs), $file;
return $self->MM::libscan($path);
}
# Write that makefile.
WriteMakefile
( NAME => 'POE::Component::Client::HTTP',
AUTHOR => 'Rocco Caputo <rcaputo@cpan.org>',
ABSTRACT => 'POE component for non-blocking/concurrent HTTP queries.',
VERSION_FROM => 'HTTP.pm',
PM => { 'HTTP.pm' => '$(INST_LIBDIR)/HTTP.pm',
'SSL.pm' => '$(INST_LIBDIR)/HTTP/SSL.pm',
},
PREREQ_PM => \%prereq,
dist =>
{ COMPRESS => 'gzip -9f',
SUFFIX => 'gz',
PREOP => ( 'cvs-log.perl | ' .
'tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES'
),
},
);
|