-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.PL
111 lines (80 loc) · 2.84 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
#! perl
use strict ;
use warnings;
require 5.010 ;
use ExtUtils::MakeMaker 5.16 ;
# Check for a 32-bit Perl
if (!eval { pack "Q", 1 }) {
warn "zipdetails requires 64 bit integers, ",
"this Perl has 32 bit integers.\n";
exit(1);
}
my %WriteMakefileArgs = (
NAME => 'App::zipdetails',
VERSION_FROM => 'lib/App/zipdetails.pm',
PREREQ_PM => { 'Getopt::Long' => 0,
'IO::File' => 0,
'Encode' => 0,
'Fcntl' => 0,
'Time::Local' => 0,
},
BUILD_REQUIRES => { 'Cwd' => 0,
'Test::More' => 0,
'File::Temp' => 0,
'File::Basename' => 0,
'Data::Dumper' => 0,
'Pod::Markdown' => 0
},
ABSTRACT => 'Display details about the internal structure of Zip files',
AUTHOR => 'Paul Marquess <pmqs@cpan.org>',
LICENSE => 'perl',
EXE_FILES => ['bin/zipdetails'],
META_MERGE => {
"meta-spec" => { version => 2 },
no_index => {
directory => [ 't' ],
},
resources => {
bugtracker => {
web => 'https://github.com/pmqs/zipdetails/issues'
},
homepage => 'https://github.com/pmqs/zipdetails',
repository => {
type => 'git',
url => 'git://github.com/pmqs/zipdetails.git',
web => 'https://github.com/pmqs/zipdetails',
},
},
},
clean => { FILES => "t/files/*.got t/files/*/*.got t/files/*/*/*.got" },
depend => { manifypods => 'READMEmd' },
) ;
delete $WriteMakefileArgs{LICENSE}
unless eval { ExtUtils::MakeMaker->VERSION(6.30) } ;
delete $WriteMakefileArgs{META_MERGE}
unless eval { ExtUtils::MakeMaker->VERSION(6.46) } ;
delete $WriteMakefileArgs{BUILD_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.55_03) } ;
WriteMakefile(%WriteMakefileArgs);
sub MY::postamble
{
my $postamble = '';
if (-e '.github') {
$postamble = <<EOM;
READMEmd: README.md
README.md: bin/zipdetails .github/badges
\@echo Creating README.md from bin/zipdetails
\$(NOECHO) \$(CHMOD) \$(PERM_RW) .github/badges README.md
\$(NOECHO) \$(CP) .github/badges README.md
\$(NOECHO) \$(ECHO) "" >> README.md
\$(NOECHO) pod2markdown bin/zipdetails >>README.md
EOM
}
else {
$postamble .= <<EOM;
READMEmd:
EOM
}
return $postamble;
}
# end of file Makefile.PL