diff options
-rw-r--r-- | Makefile.PL | 58 | ||||
-rwxr-xr-x | acmeman | 2 |
2 files changed, 35 insertions, 25 deletions
diff --git a/Makefile.PL b/Makefile.PL index d1f6d77..b46bd45 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,9 +2,17 @@ use strict; use lib 'inc'; use Module::Metadata; +use Getopt::Long qw(:config gnu_getopt no_ignore_case); +use ExtUtils::MakeMaker; -use ExtUtils::AutoInstall ( - -core => { +my %makefile_args = ( + NAME => 'App::Acmeman', + ABSTRACT_FROM => 'acmeman', + VERSION_FROM => 'acmeman', + AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>', + LICENSE => 'gpl_3', + EXE_FILES => [ 'acmeman' ], + PREREQ_PM => { 'Getopt::Long' => 2.34, 'File::Path' => 2.08, 'File::Basename' => 2.84, @@ -25,27 +33,29 @@ use ExtUtils::AutoInstall ( 'Data::Dumper' => 0, 'Net::DNS' => 1.06, 'Sys::Hostname' => 1.16 - } + }, + + MIN_PERL_VERSION => 5.006, + META_MERGE => { + 'meta-spec' => { version => 2 }, + resources => { + repository => { + type => 'git', + url => 'git://git.gnu.org.ua/gsc/acmeman.git', + web => 'http://git.gnu.org.ua/cgit/gsc/acmeman.git/', + }, + }, + provides => Module::Metadata->provides(version => '1.4', + dir => 'lib') + } ); -WriteMakefile(NAME => 'App::Acmeman', - ABSTRACT_FROM => 'acmeman', - VERSION_FROM => 'acmeman', - AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>', - LICENSE => 'gpl_3', - EXE_FILES => [ 'acmeman' ], - MIN_PERL_VERSION => 5.006, - META_MERGE => { - 'meta-spec' => { version => 2 }, - resources => { - repository => { - type => 'git', - url => 'git://git.gnu.org.ua/gsc/acmeman.git', - web => 'http://git.gnu.org.ua/cgit/gsc/acmeman.git/', - }, - }, - provides => Module::Metadata->provides(version => '1.4', - dir => 'lib') - } - -); +my $no_autoinstall; +GetOptions('no-autoinstall|N' => \$no_autoinstall) or exit(1); +unless ($no_autoinstall) { + require ExtUtils::AutoInstall; + ExtUtils::AutoInstall->import(-core => $makefile_args{PREREQ_PM}); + delete $makefile_args{PREREQ_PM}; +} + +WriteMakefile(%makefile_args); @@ -41,7 +41,7 @@ our $VERSION = '1.05'; =head1 NAME -acmeman - manages ACME certificates +App::Acmeman - manages ACME certificates =head1 SYNOPSIS |