summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2018-04-17 05:38:14 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2018-04-17 05:38:14 (GMT)
commit18b7e9a0e70e4fb03c5c1019a6f60fd39260dc58 (patch) (side-by-side diff)
treece8dc1d82e89f6bf91ab305d20f03386cdb162f9
parent503aed733443178c8c5113da85b34d8a2b44eb95 (diff)
downloadacmeman-18b7e9a0e70e4fb03c5c1019a6f60fd39260dc58.tar.gz
acmeman-18b7e9a0e70e4fb03c5c1019a6f60fd39260dc58.tar.bz2
Provide an option to skip autoinstall on compile time
Running perl Makefile.PL --no-autoinstall skips the use of ExtUtils::Autoinstall. This is useful when building the package for various distributions. * Makefile.PL: Use plain MakeMaker if given the --no-autoinstall option * acmeman: Change NAME section.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.PL58
-rwxr-xr-xacmeman2
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);
diff --git a/acmeman b/acmeman
index fe2d512..932b5c5 100755
--- a/acmeman
+++ b/acmeman
@@ -41,7 +41,7 @@ our $VERSION = '1.05';
=head1 NAME
-acmeman - manages ACME certificates
+App::Acmeman - manages ACME certificates
=head1 SYNOPSIS

Return to:

Send suggestions and report system problems to the System administrator.