Commit | Line | Data |
9d42b191 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use ExtUtils::MakeMaker; |
5 | |
4e6b0e70 |
6 | (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
7 | |
3e555cfc |
8 | my %build_requires = ( |
9d42b191 |
9 | 'Test::More' => 0, |
10 | ); |
11 | |
12 | my %requires = ( |
13 | 'Moo' => 0.009013, |
14 | 'File::Path' => 0, |
15 | 'File::Basename' => 0, |
3e555cfc |
16 | 'Module::Metadata' => 0, |
9d42b191 |
17 | 'Module::Runtime' => 0, |
18 | 'Data::YAML::Writer' => 0, |
19 | 'Object::Remote' => 0, |
20 | 'Object::Remote::Future' => 0, |
21 | 'Config::General' => 0, |
22 | 'Pod::Usage' => 0, |
23 | 'Getopt::Long' => 0, |
24 | 'Digest::SHA' => 0, |
25 | 'strictures' => 1, |
26 | 'IPC::Run' => 0, |
3e555cfc |
27 | 'Capture::Tiny' => 0.12, # capture_stderr |
b750da5f |
28 | 'File::Tree::Snapshot' => 0, |
29 | 'Object::Remote' => 0, |
8f6edb58 |
30 | 'JSON::Diffable' => 0, |
cf02394f |
31 | ); |
9d42b191 |
32 | |
33 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
34 | my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; |
35 | my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; |
36 | |
37 | WriteMakefile( |
3964214b |
38 | NAME => 'System-Introspector', |
cf02394f |
39 | VERSION_FROM => 'lib/System/Introspector.pm', |
9d42b191 |
40 | PREREQ_PM => { |
41 | %requires, |
9d42b191 |
42 | ($mymeta_works ? () : (%build_requires)), |
43 | }, |
44 | ($mymeta_works |
45 | ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong |
46 | BUILD_REQUIRES => \%build_requires, |
47 | META_ADD => { requires => \%requires } |
48 | ) |
49 | : ( # META_ADD both to get META right - only Makefile written |
50 | META_ADD => { |
51 | requires => \%requires, |
52 | build_requires => \%build_requires, |
53 | } |
54 | ) |
55 | ), |
56 | ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), |
57 | LICENSE => 'perl', |
05d3a87c |
58 | EXE_FILES => ['bin/system-introspector'], |
9d42b191 |
59 | );; |