capture origin/<name> of active branch in case remote is not tracked
[scpubgit/System-Introspector.git] / Makefile.PL
1 use strict;
2 use warnings;
3
4 use ExtUtils::MakeMaker;
5
6 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
7
8 my %build_requires = (
9     'Test::More'        => 0,
10 );
11
12 my %requires = (
13     'Moo'                       => 0.009013,
14     'File::Path'                => 0,
15     'File::Basename'            => 0,
16     'Module::Metadata'          => 0,
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,
27     'Capture::Tiny'             => 0.12, # capture_stderr
28     'File::Tree::Snapshot'      => 0,
29     'Object::Remote'            => 0,
30     'JSON::Diffable'            => 0,
31 );
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(
38   NAME => 'System-Introspector',
39   VERSION_FROM => 'lib/System/Introspector.pm',
40   PREREQ_PM => {
41     %requires,
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',
58   EXE_FILES => ['bin/system-introspector'],
59 );;