File: Makefile.PL

package info (click to toggle)
libdbi-test-perl 0.001-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 212 kB
  • ctags: 127
  • sloc: perl: 1,698; makefile: 2
file content (72 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download | duplicates (2)
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
use 5.008_001;
use strict;
use warnings;
use ExtUtils::MakeMaker;

use lib qw(lib);
use DBI::Test::Conf ();

my @generated_tests = DBI::Test::Conf->setup( AUTHOR_TESTS => 0, SKIP_FILE => "DBI-TEST.SKIP" );

my %eumm_opt = (
    MIN_PERL_VERSION => '5.008001',
    META_MERGE       => {
	resources => {
	    repository  => 'https://github.com/perl5-dbi/DBI-Test',
	    license     => 'http://dev.perl.org/licenses/',
	    },
	},
    NAME             => 'DBI::Test',
    VERSION_FROM     => 'lib/DBI/Test.pm',
    ABSTRACT_FROM    => 'lib/DBI/Test.pm',
    dist             => {
	SUFFIX          => '.gz',
	DIST_DEFAULT    => 'manifest tardist',
	COMPRESS        => 'gzip -9vf',
	},
    BUILD_REQUIRES   => {
	'Test::Simple'  => '0.90',
	},
    LICENSE          => 'perl',
    AUTHOR           => 'The DBI team <dbi-dev@perl.org>',
    clean            => {
	FILES           => join( " " => @generated_tests ),
    },
    test             => {
	TESTS           => join (' ' => 'xt/*.t', @generated_tests),
	},
    );

# Backward compatibility issues for EU::MM
{   my $eumm_version = $ExtUtils::MakeMaker::VERSION;
       $eumm_version =~ s/[^0-9.].*//; # Strip devel part
    $eumm_version < 6.5503 and #EUMM 6.5502 has problems with BUILD_REQUIRES
	$eumm_opt{PREREQ_PM} = {
	    %{$eumm_opt{PREREQ_PM} || {}},
	    %{delete $eumm_opt{BUILD_REQUIRES}},
	    };
    $eumm_version < 6.48 and delete $eumm_opt{MIN_PERL_VERSION};
    $eumm_version < 6.46 and delete $eumm_opt{META_MERGE};
    $eumm_version < 6.31 and delete $eumm_opt{LICENSE};
    }

WriteMakefile (%eumm_opt);

package MY;

sub postamble
{
    join "\n" =>
	'cover:',
	'	ccache -C',
	'	-@rm -f *.gc??',
	'	cover -test',
	'',
	'spellcheck:',
	'	pod-spell-check --aspell --ispell',
	'',
	'tgzdist:	spellcheck $(DISTVNAME).tar.gz distcheck',
	'	-@mv -f $(DISTVNAME).tar.gz $(DISTVNAME).tgz',
	'	-@cpants_lint.pl $(DISTVNAME).tgz',
	'	-@rm -f Debian_CPANTS.txt';
    } # postamble