-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.PL
executable file
·88 lines (76 loc) · 2.4 KB
/
Build.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
#!/bin/env perl
use 5.006;
use strict;
use warnings;
use Module::Build;
Module::Build->VERSION( '0.4004' );
my $class = Module::Build->subclass(
code => q{
use Cwd qw( cwd );
#---------------------------------
# Build
#---------------------------------
sub ACTION_build {
my ($s) = @_;
$s->_readme();
$s->SUPER::ACTION_build;
}
# Only for the maintainer on "Build build".
sub _readme {
my ($s) = @_;
return if cwd() !~ m{ / git / perlmy / [^/]+ $ }x;
my ($installed) =
grep { -x "$_/pod2markdown" }
split /:/, $ENV{PATH};
return if !$installed;
print "Building README\n";
my $lib = $s->{properties}{dist_version_from};
system "pod2markdown $lib > README.md";
}
#---------------------------------
# Install
#---------------------------------
sub ACTION_install {
my ($s) = @_;
$s->SUPER::ACTION_install;
# Display logo/image.
system qq( pod e -q head1=LOGO/Verbatim );
}
},
);
my $builder = $class->new(
module_name => 'e',
license => 'artistic_2',
dist_author => q{Tim Potapov <[email protected]>},
dist_version_from => 'lib/e.pm',
release_status => 'stable',
configure_requires => {
'Module::Build' => '0.4004',
},
test_requires => {
'Test::More' => '0',
},
requires => {
'perl' => '5.016',
'App::Pod' => '0.39',
'Data::Printer' => '0',
'Data::Trace' => '1.05',
'Mojolicious' => '0',
'Parallel::ForkManager' => '0',
'Runtime::Debugger' => '1.05',
'Set::Scalar' => '0',
'Sub::Util' => '0',
'Term::Table' => '0',
'Text::CSV_XS' => '0',
'Tiny::Prof' => '0.03',
'YAML::XS' => '0',
},
add_to_cleanup => [ 'e-*', 'MANIFEST*.bak', 'blib/', 'pod2htmd.tmp' ],
meta_merge => {
resources => {
bugtracker => 'https://github.com/poti1/e/issues',
repository => 'https://github.com/poti1/e',
},
},
);
$builder->create_build_script();