]> git.vpit.fr Git - perl/modules/autovivification.git/blob - Makefile.PL
Build the $name and the main $file from $dist
[perl/modules/autovivification.git] / Makefile.PL
1 use 5.008;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 my @DEFINES;
8
9 # Threads, Windows and 5.8.x don't seem to be best friends
10 if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
11  push @DEFINES, '-DI_MULTIPLICITY=0';
12 }
13
14 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
15
16 my $dist = 'autovivification';
17
18 (my $name = $dist) =~ s{-}{::}g;
19
20 (my $file = $dist) =~ s{-}{/}g;
21 $file = "lib/$file.pm";
22
23 my %PREREQ_PM = (
24  'XSLoader' => 0,
25 );
26
27 my %META = (
28  configure_requires => {
29   'ExtUtils::MakeMaker' => 0,
30  },
31  build_requires => {
32   'ExtUtils::MakeMaker' => 0,
33   'Test::More'          => 0,
34   %PREREQ_PM,
35  },
36  dynamic_config => 1,
37  resources => {
38   bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
39   homepage   => "http://search.cpan.org/dist/$dist/",
40   license    => 'http://dev.perl.org/licenses/',
41   repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
42  },
43 );
44
45 WriteMakefile(
46     NAME             => $name,
47     AUTHOR           => 'Vincent Pit <perl@profvince.com>',
48     LICENSE          => 'perl',
49     VERSION_FROM     => $file,
50     ABSTRACT_FROM    => $file,
51     PL_FILES         => {},
52     @DEFINES,
53     PREREQ_PM        => \%PREREQ_PM,
54     MIN_PERL_VERSION => 5.008,
55     META_MERGE       => \%META,
56     dist             => {
57         PREOP    => "pod2text $file > \$(DISTVNAME)/README",
58         COMPRESS => 'gzip -9f', SUFFIX => 'gz'
59     },
60     clean            => {
61         FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"
62     },
63 );