diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-04-17 07:38:14 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-04-17 07:38:14 +0200 |
commit | 18b7e9a0e70e4fb03c5c1019a6f60fd39260dc58 (patch) | |
tree | ce8dc1d82e89f6bf91ab305d20f03386cdb162f9 | |
parent | 503aed733443178c8c5113da85b34d8a2b44eb95 (diff) | |
download | acmeman-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.
-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 @@ | |||
2 | use strict; | 2 | use strict; |
3 | use lib 'inc'; | 3 | use lib 'inc'; |
4 | use Module::Metadata; | 4 | use Module::Metadata; |
5 | use Getopt::Long qw(:config gnu_getopt no_ignore_case); | ||
6 | use ExtUtils::MakeMaker; | ||
5 | 7 | ||
6 | use ExtUtils::AutoInstall ( | 8 | my %makefile_args = ( |
7 | -core => { | 9 | NAME => 'App::Acmeman', |
10 | ABSTRACT_FROM => 'acmeman', | ||
11 | VERSION_FROM => 'acmeman', | ||
12 | AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>', | ||
13 | LICENSE => 'gpl_3', | ||
14 | EXE_FILES => [ 'acmeman' ], | ||
15 | PREREQ_PM => { | ||
8 | 'Getopt::Long' => 2.34, | 16 | 'Getopt::Long' => 2.34, |
9 | 'File::Path' => 2.08, | 17 | 'File::Path' => 2.08, |
10 | 'File::Basename' => 2.84, | 18 | 'File::Basename' => 2.84, |
@@ -25,27 +33,29 @@ use ExtUtils::AutoInstall ( | |||
25 | 'Data::Dumper' => 0, | 33 | 'Data::Dumper' => 0, |
26 | 'Net::DNS' => 1.06, | 34 | 'Net::DNS' => 1.06, |
27 | 'Sys::Hostname' => 1.16 | 35 | 'Sys::Hostname' => 1.16 |
28 | } | 36 | }, |
37 | |||
38 | MIN_PERL_VERSION => 5.006, | ||
39 | META_MERGE => { | ||
40 | 'meta-spec' => { version => 2 }, | ||
41 | resources => { | ||
42 | repository => { | ||
43 | type => 'git', | ||
44 | url => 'git://git.gnu.org.ua/gsc/acmeman.git', | ||
45 | web => 'http://git.gnu.org.ua/cgit/gsc/acmeman.git/', | ||
46 | }, | ||
47 | }, | ||
48 | provides => Module::Metadata->provides(version => '1.4', | ||
49 | dir => 'lib') | ||
50 | } | ||
29 | ); | 51 | ); |
30 | 52 | ||
31 | WriteMakefile(NAME => 'App::Acmeman', | 53 | my $no_autoinstall; |
32 | ABSTRACT_FROM => 'acmeman', | 54 | GetOptions('no-autoinstall|N' => \$no_autoinstall) or exit(1); |
33 | VERSION_FROM => 'acmeman', | 55 | unless ($no_autoinstall) { |
34 | AUTHOR => 'Sergey Poznyakoff <gray@gnu.org>', | 56 | require ExtUtils::AutoInstall; |
35 | LICENSE => 'gpl_3', | 57 | ExtUtils::AutoInstall->import(-core => $makefile_args{PREREQ_PM}); |
36 | EXE_FILES => [ 'acmeman' ], | 58 | delete $makefile_args{PREREQ_PM}; |
37 | MIN_PERL_VERSION => 5.006, | 59 | } |
38 | META_MERGE => { | 60 | |
39 | 'meta-spec' => { version => 2 }, | 61 | WriteMakefile(%makefile_args); |
40 | resources => { | ||
41 | repository => { | ||
42 | type => 'git', | ||
43 | url => 'git://git.gnu.org.ua/gsc/acmeman.git', | ||
44 | web => 'http://git.gnu.org.ua/cgit/gsc/acmeman.git/', | ||
45 | }, | ||
46 | }, | ||
47 | provides => Module::Metadata->provides(version => '1.4', | ||
48 | dir => 'lib') | ||
49 | } | ||
50 | |||
51 | ); | ||
@@ -41,7 +41,7 @@ our $VERSION = '1.05'; | |||
41 | 41 | ||
42 | =head1 NAME | 42 | =head1 NAME |
43 | 43 | ||
44 | acmeman - manages ACME certificates | 44 | App::Acmeman - manages ACME certificates |
45 | 45 | ||
46 | =head1 SYNOPSIS | 46 | =head1 SYNOPSIS |
47 | 47 | ||