3 use ExtUtils::MakeMaker;
4 $ExtUtils::MakeMaker::VERSION =~ s/_//g;
5 my @sign = (MM->can("signature_target") ? (SIGN => 1) : ());
6 my $version_diff = 0; # we'll have to die if this becomes true
7 $::version_from = 'lib/CPAN/Testers/ParseReport.pm';
8 my $mmgenereatedversionfrom = MM->parse_version($::version_from);
9 if ($ARGV[0] && $ARGV[0] eq "--setversion") {
10 die "Your perl is a bit dated[$]].\nDo not make a release with it\n" if $] < 5.008;
11 warn "Your MakeMaker is a bit dated[$ExtUtils::MakeMaker::VERSION].\nYou should get a new one\n"
12 if $ExtUtils::MakeMaker::VERSION < 6.4502;
13 eval { require $::version_from; }; die $@ if $@;
14 my $makefile = "Makefile";
15 unless (-f $makefile) {
16 $makefile = "Makefile.old";
18 unless (-f $makefile) {
19 die "no Makefile and no Makefile.old found";
21 open my $fh, "make -f $makefile the-release-name|" or die "Could not fork: $!";
23 my ($have_version) = <$fh> =~ /^version\s+([\d\._]+)/m;
24 close $fh or die "Could not close: $!";
25 my ($namespace) = $::version_from;
26 $namespace =~ s|^lib/(.+)\.pm$|$1|;
27 $namespace =~ s|/|::|g;
28 eval qq{ if (\$$namespace\::VERSION != \$have_version) {
29 warn "Not equal: CPAN::Testers::ParseReport::VERSION[\$$namespace\::VERSION] Makefile version[\$have_version]";
32 eval qq{ if (\$$namespace\::VERSION != \$mmgenereatedversionfrom) {
33 warn "Not equal: CPAN::Testers::ParseReport::VERSION[\$$namespace\::VERSION] MM generated version[\$mmgenereatedversionfrom]";
40 'NAME' => 'CPAN::Testers::ParseReport',
41 'VERSION_FROM' => $::version_from,
43 'DateTime::Format::Strptime' => 0,
44 'DateTime::Format::DateParse' => 0,
47 'HTML::Entities' => 0,
49 'LWP::UserAgent' => 0,
53 'Statistics::Regression' => 0,
58 'XML::LibXML::XPathContext' => 0,
61 'INSTALLDIRS' => 'site',
66 ABSTRACT => "parse reports to www.cpantesters.org from various sources",
69 DIST_DEFAULT => join(" ", # note: order matters!
70 "verify-changes-date",
77 COMPRESS => 'bzip2 -9f',
80 ($ExtUtils::MakeMaker::VERSION >= 6.4502 ?
82 # write: git push git+ssh://repo.or.cz/srv/git/cpan-testers-parsereport.git master
83 repository => "git://repo.or.cz/cpan-testers-parsereport.git",
84 provides => { "CPAN::Testers::ParseReport" => { version => $mmgenereatedversionfrom, file => $::version_from }},
91 ==> I had to update some \$VERSIONs <==
92 ==> Your Makefile has been rebuilt. <==
93 ==> Please rerun the make command. <==
101 # the subdirs on MY OWN BOX are allowed here (only used for make dist!)
102 OKDIRS=DIST|bin|blib|cover_db\
105 Makefile: }.$::version_from.q{
108 $(CP) $(DISTVNAME)/META.yml ./META.yml
111 $(PERL) Makefile.PL --setversion
114 @$(PERL) -ne 'BEGIN{my@t=(localtime)[5,4,3];$$t[0]+=1900;$$t[1]++;$$t=sprintf"%04d-%02d-%02d",@t}' \
115 -e '$$ok++,exit if /^$$t\s/; END{die "Alert: did not find <$$t> in Changes file" unless $$ok}' Changes
118 @$(PERL) -e 'my$$s=join",",grep{!/^($(OKDIRS))\z/x&&-d($$_)}glob"*";' \
119 -e 'die"unexpected dir:$$s"if$$s'
122 $(NOECHO) $(ECHO) 'version ' $(VERSION)
123 $(NOECHO) $(ECHO) 'release-name ' $(DISTVNAME).tar$(SUFFIX)
126 $(PERL) -I../CPAN/GIT/trunk/release-lib -S release $(DISTVNAME).tar$(SUFFIX)
137 # if we depend on $(DISTVNAME).tar$(SUFFIX), then the rest of the
138 # Makefile breaks our intent to NOT remake dist
141 tar xvjf $(DISTVNAME).tar$(SUFFIX)
142 cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
143 cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
144 cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
147 touch $(DISTVNAME)/SIGNATURE && $(CP) $(DISTVNAME)/SIGNATURE ./SIGNATURE
148 $(CP) $(DISTVNAME)/META.yml ./META.yml
149 $(CP) $(DISTVNAME)/MANIFEST ./MANIFEST
156 my $out = $self->SUPER::distdir;
157 $out =~ s/distdir :/distdir ::/g;
161 # dist_dir was the name in very old MakeMaker as of 5.005_04
164 my $out = $self->SUPER::dist_dir;
165 $out =~ s/distdir :/distdir ::/g;