-
Notifications
You must be signed in to change notification settings - Fork 36
/
Makefile.PL
168 lines (141 loc) · 4.74 KB
/
Makefile.PL
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
#!/usr/bin/env perl
use FindBin;
BEGIN {
my $env = "$FindBin::Bin/script/env";
if (-r $env) {
do $env or die $@;
}
}
use strict;
use warnings;
use inc::Module::Install 0.91;
name 'Gitalist';
all_from 'lib/Gitalist.pm';
author 'Dan Brook <[email protected]>';
license 'gpl2';
if ($ENV{GITALIST_RELEASE_TESTING}) {
# Nasty hack as Module::Install kindly re-loads all of these :/
local $SIG{__WARN__} = sub { return if $_[0] =~ /redefined/; warn shift };
require Module::Install::AuthorRequires;
require Module::Install::AuthorTests;
author_tests('t/author');
author_requires('Test::NoTabs');
author_requires('Test::Pod' => '1.14');
author_requires('Test::Pod::Coverage' => '1.04');
require File::Find;
require FindBin;
require ExtUtils::MM_Unix;
# Fill in provides info so that indexing works right (in the face of MX::Declare)
# by just smashing filenames to package names and not trying to be smart..
File::Find::find(sub {
return unless /^\w.*?\.pm$/;
my $fn = $File::Find::name;
my $ver = ExtUtils::MM_Unix->parse_version($fn);
$fn =~ s/.+?lib/lib/;
my $pn = $fn;
$pn =~ s|^lib/||;
$pn =~ s|/|::|g;
$pn =~ s/\.pm$//;
provides(
$pn => {
file => $fn,
# Ewww
$ver ne 'undef' ? (version => $ver) : (),
},
);
}, $FindBin::Bin . "/lib");
}
requires 'Catalyst::Runtime' => '5.90013';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::StackTrace';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::Plugin::Unicode::Encoding';
requires 'Catalyst::Plugin::SubRequest' => '0.15';
requires 'Catalyst::Action::RenderView';
requires 'Catalyst::Action::REST';
requires 'Catalyst::Component::InstancePerContext';
requires 'Catalyst::View::Component::SubInclude' => '0.07';
requires 'Catalyst::View::TT' => '0.34';
requires 'Try::Tiny';
requires 'Template' => '2.22';
requires 'Template::Plugin::Cycle';
requires 'Template::Plugin::UTF8Decode';
requires 'Config::General';
requires 'Moose';
requires 'Moose::Autobox';
requires 'MooseX::Declare' => '0.32';
requires 'MooseX::Storage';
requires 'MooseX::Types';
requires 'MooseX::Types::Common';
requires 'MooseX::Types::Path::Class';
requires 'MooseX::Types::DateTime' => '0.05';
requires 'MooseX::Types::LoadableClass';
requires 'namespace::autoclean';
requires 'Class::Load' => '0.20';
requires 'Git::Gitalist' => '0.000002';
requires 'aliased';
requires 'CGI';
requires 'DateTime';
requires 'File::Copy::Recursive';
requires 'File::Type';
requires 'File::Type::WebImages';
requires 'HTML::Entities';
requires 'IPC::Run';
requires 'JSON';
requires 'JSON::XS';
requires 'Path::Class' => '0.17';
requires 'Syntax::Highlight::Engine::Kate';
requires 'Sys::Hostname';
requires_external_bin 'git';
test_requires 'Test::More' => '0.88';
test_requires 'Test::Exception' => '0.31';
resources bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Gitalist';
resources repository => 'git://git.shadowcat.co.uk/catagits/Gitalist.git';
catalyst;
if ($Module::Install::AUTHOR) {
system("pod2text lib/Gitalist.pm > README")
and die $!;
include 'File::Copy::Recursive';
}
if ($ENV{GITALIST_RELEASE_TESTING}) {
author_tests('t/author');
author_requires('Test::NoTabs');
author_requires('Test::Pod' => '1.14');
author_requires('Test::Pod::Coverage' => '1.04');
author_requires('Test::WWW::Mechanize::Catalyst' => '0.51');
author_requires('HTML::TreeBuilder::XPath');
author_requires('WWW::Mechanize::TreeBuilder');
}
install_script glob('script/*.p{l,sgi}');
auto_install;
{ # Make sure you REALLY REALLY have to have the env variable set to run
# any of the dist actions.
package # PAUSE HIDE
MY;
sub dist_core { # MakeMaker is awesome fun to customise. And when I say
my ($self, @args) = @_; # fun I mean OH GOD MY EYES.
my $text = $self->SUPER::dist_core(@args);
my @lines = split /\n/, $text;
unless ($ENV{GITALIST_RELEASE_TESTING}) {
my ($printed, @out_lines);
foreach my $in (@lines) {
if ($in =~ /^\S/) {
undef $printed;
$in =~ s/:.*$/:/g;
push @out_lines, $in;
}
elsif ($in =~ /^\s+$/) {
push @out_lines, $in;
}
elsif (!$printed) {
push @out_lines, "\techo Get stuffed mate - set GITALIST_RELEASE_TESTING if you really want to do this..";
$printed = 1;
}
else {}
}
@lines = @out_lines;
}
return join "\n", @lines;
}
}
WriteAll;