ready to release
[acme-study-perl.git] / Makefile.PL
blob210f7e700f5ed9d350fda546766a82a957a5f922
1 use strict;
2 use warnings;
3 use ExtUtils::MakeMaker;
4 $ExtUtils::MakeMaker::VERSION =~ s/_//g;
5 my @sign = (MM->can("signature_target") ? (SIGN => 1) : ());
7 WriteMakefile
8     (
9      NAME                => 'Acme::Study::Perl',
10      AUTHOR              => 'Andreas König <andreas.koenig.7os6VVqR@franz.ak.mind.de>',
11      VERSION_FROM        => 'lib/Acme/Study/Perl.pm',
12      ABSTRACT_FROM       => 'lib/Acme/Study/Perl.pm',
13      PL_FILES            => {},
14      PREREQ_PM => {
15                    'Data::Dumper' => 0,
16                    'Test::More' => 0,
17                   },
18      dist                => { COMPRESS => 'gzip -9f', SUFFIX => '.gz', },
19      ($ExtUtils::MakeMaker::VERSION >= 6.4502 ?
20       (META_ADD => {
21                     # write: git push git+ssh://repo.or.cz/srv/git/acme-study-perl.git master
22                     repository => "git://repo.or.cz/acme-study-perl.git",
23                    }) : ()),
24      @sign,
25     );
27 package MY;
28 sub postamble {
29   my @m;
30   push @m, q{
31 Makefile: MANIFEST
33 META.yml: metafile
34         $(CP) $(DISTVNAME)/META.yml  ./META.yml
36 setversion:
37         $(PERL) Makefile.PL --setversion
39 the-release-name :
40         $(NOECHO) $(ECHO) 'version ' $(VERSION)
41         $(NOECHO) $(ECHO) 'release-name ' $(DISTVNAME).tar$(SUFFIX)
43 release ::
44         /usr/bin/perl -I../CPAN/GIT/trunk/release-lib -S release $(DISTVNAME).tar$(SUFFIX)
45         rm -rf $(DISTVNAME)
47 sign:
48         cpansign -s
50   join "", @m;
53 sub dist_test {
54   return q{
55 # if we depend on $(DISTVNAME).tar$(SUFFIX), then the rest of the
56 # Makefile breaks our intent to NOT remake dist
57 disttest :
58         rm -rf $(DISTVNAME)
59         tar xvzf $(DISTVNAME).tar$(SUFFIX)
60         cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL
61         cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
62         cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
64 distdir ::
65         touch $(DISTVNAME)/SIGNATURE && $(CP) $(DISTVNAME)/SIGNATURE ./SIGNATURE
66         $(CP) $(DISTVNAME)/META.yml  ./META.yml
67         $(CP) $(DISTVNAME)/MANIFEST  ./MANIFEST
72 sub distdir {
73   my $self = shift;
74   my $out = $self->SUPER::distdir;
75   $out =~ s/distdir :/distdir ::/g;
76   return $out;
79 # dist_dir was the name in very old MakeMaker as of 5.005_04
80 sub dist_dir {
81   my $self = shift;
82   my $out = $self->SUPER::dist_dir;
83   $out =~ s/distdir :/distdir ::/g;
84   return $out;