forked from oetiker/mojolicious-plugin-reverseproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.PL
More file actions
56 lines (48 loc) · 1.78 KB
/
Copy pathMakefile.PL
File metadata and controls
56 lines (48 loc) · 1.78 KB
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
use 5.010001;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use FindBin;
WriteMakefile(
NAME => 'Mojolicious::Plugin::ReverseProxy',
VERSION_FROM => 'lib/Mojolicious/Plugin/ReverseProxy.pm',
ABSTRACT => 'ReverseProxy plugin for the Mojolicious Perl framework',
AUTHOR => 'Tobias Oetiker <tobi@oetiker.ch>',
LICENSE => 'artistic_2',
PREREQ_PM => {
'Mojolicious' => '7.00'
},
BUILD_REQUIRES => {
'Pod::Markdown::Github' => '0.01',
'CPAN::Uploader' => 0,
},
META_MERGE => {
requires => {perl => '5.010001'},
resources => {
license => 'http://www.opensource.org/licenses/artistic-license-2.0',
repository => 'https://github.com/oetiker/Mojolicious-Plugin-ReverseProxy',
bugtracker => 'https://github.com/oetiker/Mojolicious-Plugin-ReverseProxy/issues'
},
no_index => {directory => ['t','example','setup']}
},
test => {TESTS => 't/*.t'}
);
sub MY::postamble {
my $self = shift;
my %r = (%{ $self->{PREREQ_PM} || {} }, %{ $self->{BUILD_REQUIRES} || {} }, %{ $self->{TEST_REQUIRES} || {} } );
my $modules = join " ", grep !/^perl\@/, map { $r{$_} ? $_ .'@'. $r{$_} : $_ } keys %r;
my $tpd = "$FindBin::RealBin/3rd";
warn "** call 'make 3rd' to build missing dependencies ...\n";
return <<"EOF";
all:: README.md README
README.md: $self->{VERSION_FROM}
\$(PERL) -I$tpd/lib/perl5 -MPod::Markdown::Github -e 'binmode(STDOUT, ":utf8");Pod::Markdown::Github->new->filter(q{$self->{VERSION_FROM}})' > README.md
README: README.md
cp README.md README
3rd: $tpd/touch
mkdir -p $tpd
$tpd/touch: Makefile
\$(NOECHO) \$(ECHO) "*** INSTALLING MISSING BITS FOR TESTING ***"
curl -L http://cpanmin.us | PERL_CPANM_HOME=$tpd \$(PERL) - -q --notest --local-lib-contained $tpd $modules && touch $tpd/touch
EOF
}