File: Makefile.PL

package info (click to toggle)
libdatetime-calendar-julian-perl 0.100-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 172 kB
  • sloc: perl: 69; makefile: 2
file content (93 lines) | stat: -rw-r--r-- 2,116 bytes parent folder | download
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

use 5.008004;

use ExtUtils::MakeMaker;

( my $mmv = ExtUtils::MakeMaker->VERSION ) =~ s/_//g;

my %attr = (
    NAME		=> 'DateTime::Calendar::Julian',
    VERSION_FROM	=> 'lib/DateTime/Calendar/Julian.pm',
    PREREQ_PM		=> { DateTime => 0.08 },
    ABSTRACT		=> 'DateTime object in the Julian calendar',
    AUTHOR		=> [
	'Eugene van der Pijll <pijll@gmx.net>',
	'Thomas R. Wyant, III <wyant at cpan dot org>',
    ],
    realclean	=> { FILES => 'cover_db' },
);

$mmv ge '6.31' and $attr{LICENSE} = 'perl';

$mmv ge '6.4701' and $attr{MIN_PERL_VERSION} = '5.008004';

if ( $mmv >= 6.4501 ) {
    $attr{META_MERGE} = {
	'meta-spec'	=> {
	    version	=> 2,
	},
	dynamic_config	=> 0,
	no_index	=> {
	    directory	=> [ qw{ t xt } ],
	},
	resources	=> {
	    bugtracker	=> {
                web	=> 'https://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-Calendar-Julian',
                mailto  => 'wyant@cpan.org',
            },
	    license	=> 'http://dev.perl.org/licenses/',
	    repository	=> {
		type	=> 'git',
		url	=> 'git://github.com/trwyant/perl-DateTime-Calendar-Julian.git',
		web	=> 'https://github.com/trwyant/perl-DateTime-Calendar-Julian',
	    },
	},
	provides(),
    };
}

my %build_requires = (
    'Test::More'	=> 0.88,
);

if ( $mmv >= 6.5501 ) {
    $attr{BUILD_REQUIRES} = \%build_requires;
} else {
    @{ $attr{PREREQ_PM} }{ keys %build_requires } = values %build_requires;
}

WriteMakefile( %attr );

sub MY::postamble {
    my ( $self, @args ) = @_;

    my $authortest = $self->test_via_harness(
	'$(FULLPERLRUN)', '$(AUTHORTEST_FILES)' );
    $authortest =~ s/ \s+ \z //smx;
    $authortest =~ s/ \A \s+ //smx;
    chomp $authortest;

    return <<"EOD";

AUTHORTEST_FILES = t/*.t xt/author/*.t

authortest :: pure_all
	AUTHOR_TESTING=1 $authortest

testcover :: pure_all
	cover -test -ignore_re=inc/ -ignore_re=eg/
EOD
}

sub provides {
    -d 'lib'
	or return;
    local $@ = undef;
    my $provides = eval {
	require Module::Metadata;
	Module::Metadata->provides( version => 2, dir => 'lib' );
    } or return;
    return ( provides => $provides );
}

# ex: set textwidth=72 :