forked from w3c/link-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PL
106 lines (92 loc) · 3.33 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
use 5.008;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'W3C::LinkChecker',
ABSTRACT => 'W3C Link Checker',
AUTHOR => 'W3C QA-dev Team <[email protected]>',
LICENSE => 'open_source',
VERSION_FROM => 'bin/checklink',
PREREQ_PM => {
# Hard dependencies:
CSS::DOM => 0.09,
CSS::DOM::Constants => 0,
CSS::DOM::Style => 0,
CSS::DOM::Util => 0,
Encode => 0,
HTML::Entities => 0,
HTML::Parser => "3.40",
HTTP::Headers::Util => 0,
HTTP::Message => 5.827,
HTTP::Request => 0,
HTTP::Response => "1.50",
LWP::RobotUA => 1.19,
LWP::UserAgent => 0,
Net::HTTP::Methods => 5.833,
Time::HiRes => 0,
URI => 1.53,
URI::Escape => 0,
# Optional, but required if using a config file:
Config::General => 2.06,
# Optional, but required if private IPs are disallowed:
Net::hostent => 0,
Net::IP => 0,
Socket => 0,
# Optional, but required in command line mode:
File::Spec => 0,
Getopt::Long => 2.17,
Text::Wrap => 0,
URI::file => 0,
# Optional, used for password input in command line mode:
Term::ReadKey => 2.00,
# Optional, used for guessing language in command line mode:
Locale::Country => 0,
Locale::Language => 0,
# Optional, used when decoding arguments in command line mode:
Encode::Locale => 0,
# Optional, but required in CGI mode:
CGI => 0,
CGI::Carp => 0,
CGI::Cookie => 0,
# Optional, required if using cookies:
HTTP::Cookies => 0,
# Required for the test suite:
File::Spec => 0,
Test::More => 0,
},
PM => {'lib/W3C/LinkChecker.pm' => '$(INST_LIB)/W3C/LinkChecker.pm'},
EXE_FILES => ['bin/checklink'],
MAN1PODS =>
{'bin/checklink.pod' => '$(INST_MAN1DIR)/checklink.$(MAN1EXT)',},
META_MERGE => {
resources => {
homepage => 'https://validator.w3.org/checklink',
bugtracker => 'https://github.com/w3c/link-checker/issues/',
repository => 'https://github.com/w3/link-checker/',
MailingList =>
'https://lists.w3.org/Archives/Public/www-validator/',
},
},
depend => {distdir => 'lib/W3C/LinkChecker.pm'},
dist => {TARFLAGS => '--owner=0 --group=0 -cvf'},
clean => {FILES => 'Makefile.PL.bak bin/checklink.bak'},
);
sub MY::postamble
{
return <<'MAKE_FRAG';
lib/W3C/LinkChecker.pm: Makefile.PL bin/checklink
$(MKPATH) lib/W3C
$(ECHO) "# Dummy module for CPAN indexing purposes." > $@
$(ECHO) "package $(NAME);" >> $@
$(ECHO) "use strict;" >> $@
$(ECHO) "use vars qw(\$$VERSION);" >> $@
$(ECHO) "\$$VERSION = \"$(VERSION)\";" >> $@
$(ECHO) "1;" >> $@
PERLTIDY = perltidy --profile=etc/perltidyrc --backup-and-modify-in-place \
--backup-file-extension=/
perltidy:
@for file in Makefile.PL bin/checklink ; do \
echo "$(PERLTIDY) $$file" ; \
$(PERLTIDY) $$file ; \
done
MAKE_FRAG
}