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 my $version_from = 'lib/File/Rsync/Mirror/Recent.pm';
10 open my $fh, "<", $version_from or die "Could not open $version_from: $!";
11 my @version = grep /VERSION\s*=\s*qv/, <$fh>;
16 if ($ARGV[0] && $ARGV[0] eq "--setversion") {
17 die "Your perl is a bit dated[$]].\nDo not make a release with it\n" if $] < 5.008;
18 warn "Your MakeMaker is a bit dated[$ExtUtils::MakeMaker::VERSION].\nYou should get a new one\n"
19 if $ExtUtils::MakeMaker::VERSION < 6.4502;
20 eval { require $version_from; }; die $@ if $@;
21 my $makefile = "Makefile";
22 unless (-f $makefile) {
23 $makefile = "Makefile.old";
25 unless (-f $makefile) {
26 die "no Makefile and no Makefile.old found";
28 open my $fh, "make the-release-name|" or die "Could not fork: $!";
30 my ($have_version) = <$fh> =~ /^version\s+([\d\._]+)/m;
31 close $fh or die "Could not close: $!";
32 my ($namespace) = $version_from;
33 $namespace =~ s|^lib/(.+)\.pm$|$1|;
34 $namespace =~ s|/|::|g;
35 eval qq{ if (\$$namespace\::VERSION != \$have_version) {
36 warn "Not equal: CPAN::Testers::ParseReport::VERSION[\$$namespace\::VERSION] Makefile version[\$have_version]";
43 NAME => 'File::Rsync::Mirror::Recent',
45 AUTHOR => 'Andreas König <andreas.koenig.7os6VVqR@franz.ak.mind.de>',
49 # 'Data::Serializer' => 0.46, # restricted to YAML without it
54 'File::Basename' => 0,
57 'List::MoreUtils' => 0,
58 'List::Pairwise' => 0,
60 'Data::Serializer' => 0,
64 EXE_FILES => [qw(bin/rrr-aggregate bin/rrr-news)],
66 DIST_DEFAULT => join(" ", # note: order matters!
73 COMPRESS => 'gzip -9',
75 ($ExtUtils::MakeMaker::VERSION >= 6.4502 ?
77 # write: git push git+ssh://repo.or.cz/srv/git/rersyncrecent.git master
78 repository => "git://repo.or.cz/rersyncrecent.git",
80 "File::Rsync::Mirror::Recent" =>
83 file => $version_from,
88 clean => { FILES => 'File-Rsync-Mirror-Recent-*' },
93 ==> I had to update some \$VERSIONs <==
94 ==> Your Makefile has been rebuilt. <==
95 ==> Please rerun the make command. <==
106 $(CP) $(DISTVNAME)/META.yml ./META.yml
109 $(PERL) Makefile.PL --setversion
112 $(NOECHO) $(ECHO) 'version ' $(VERSION)
113 $(NOECHO) $(ECHO) 'release-name ' $(DISTVNAME).tar$(SUFFIX)
116 /usr/bin/perl -I../CPAN/GIT/trunk/release-lib -S release $(DISTVNAME).tar$(SUFFIX)
127 # if we depend on $(DISTVNAME).tar$(SUFFIX), then the rest of the
128 # Makefile breaks our intent to NOT remake dist
131 tar xvzf $(DISTVNAME).tar$(SUFFIX)
132 cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
133 cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
134 cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
137 touch $(DISTVNAME)/SIGNATURE && $(CP) $(DISTVNAME)/SIGNATURE ./SIGNATURE
138 $(CP) $(DISTVNAME)/META.yml ./META.yml
139 $(CP) $(DISTVNAME)/MANIFEST ./MANIFEST
146 my $out = $self->SUPER::distdir;
147 $out =~ s/distdir :/distdir ::/g;
151 # dist_dir was the name in very old MakeMaker as of 5.005_04
154 my $out = $self->SUPER::dist_dir;
155 $out =~ s/distdir :/distdir ::/g;