Skip to content

Commit

Permalink
Meta (#154)
Browse files Browse the repository at this point in the history
* updates to Build.PL and Makefile.PL
* move feature dependencies into sections
* move optional deps to recommends
* install_deps: update for Makefile.PL prereq format
  • Loading branch information
msimerson authored Nov 12, 2019
1 parent d1890fd commit c1f982c
Show file tree
Hide file tree
Showing 8 changed files with 626 additions and 326 deletions.
149 changes: 108 additions & 41 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

use strict;
use warnings;

use Module::Build 0.3601;


my %module_build_args = (
my $module_build_args = {
"build_requires" => {
"Module::Build" => "0.3601"
},
"configure_requires" => {
"ExtUtils::MakeMaker" => 0,
"File::ShareDir::Install" => "0.06",
"Module::Build" => "0.3601"
},
Expand All @@ -21,28 +18,17 @@ my %module_build_args = (
"Marc Bradshaw <marc\@marcbradshaw.net>"
],
"dist_name" => "Mail-DMARC",
"dist_version" => "1.20191024",
"license" => "perl",
"module_name" => "Mail::DMARC",
"release_status" => "stable",
"add_to_cleanup" => [ "dmarc_reports.sqlite", "t/reports-test.sqlite"],
"recommends" => {
"CGI" => 0,
"Email::Simple" => 0,
"IO::Compress::Gzip" => 0,
"IO::Compress::Zip" => 0,
"IO::Uncompress::Gunzip" => 0,
"IO::Uncompress::Unzip" => 0,
"Mail::DKIM" => 0,
# "MIME::Lite" => 0,
"Net::HTTP" => 0,
"Net::IMAP::Simple" => 0,
"Net::Server" => 2,
"XML::SAX::ParserFactory" => 0,
"XML::Validator::Schema" => 0,
"Net::SMTPS" => 0,
},
"recursive_test_files" => 1,
"requires" => {
"CGI" => 0,
"CPAN" => 0,
"Carp" => 0,
"Config::Tiny" => 0,
"DBD::SQLite" => "1.31",
Expand All @@ -54,26 +40,16 @@ my %module_build_args = (
"English" => 0,
"File::ShareDir" => 0,
"Getopt::Long" => 0,
"HTTP::Request" => 0,
"HTTP::Tiny" => 0,
"IO::Compress::Gzip" => 0,
"IO::Compress::Zip" => 0,
"IO::File" => 0,
"IO::Socket::SSL" => 0,
"IO::Uncompress::Gunzip" => 0,
"IO::Uncompress::Unzip" => 0,
"JSON" => 0,
"LWP::UserAgent" => 0,
"Mail::DKIM::PrivateKey" => 0,
"Mail::DKIM::Signer" => 0,
"Mail::DKIM::TextWrap" => 0,
"Net::DNS::Resolver" => 0,
"Net::HTTP" => 0,
"Net::IDN::Encode" => 0,
"Net::IP" => 0,
"Net::SMTPS" => 0,
"Net::SSLeay" => 0,
"Net::Server::HTTP" => 0,
"POSIX" => 0,
"Pod::Usage" => 0,
"Regexp::Common" => "2013031301",
Expand All @@ -84,12 +60,66 @@ my %module_build_args = (
"Test::File::ShareDir" => 0,
"URI" => 0,
"XML::LibXML" => 0,
"lib" => 0,
"parent" => 0,
"perl" => "5.008",
"strict" => 0,
"warnings" => 0
},
"auto_features" => {
"mysql" => {
"description" => "MySQL backend storage",
"prereqs" => {
"runtime" => {
"requires" => {
'DBD::mysql' => '4.001',
}
}
}
},
"postgres" => {
"description" => "PostgresQL backend storage",
"prereqs" => {
"runtime" => {
"requires" => {
'DBD::Pg' => '0'
}
}
}
},
"web_services" => {
"description" => "HTTP API and web UI to DMARC reports",
"prereqs" => {
"runtime" => {
"requires" => {
"CGI" => 0,
"HTTP::Request" => 0,
"HTTP::Tiny" => 0,
"JSON" => 0,
"LWP::UserAgent" => 0,
"Net::HTTP" => 0,
"Net::Server::HTTP" => 0,
"Net::Server" => 2,
}
}
}
},
"smtp_sending" => {
"description" => "Send DMARC reports via SMTP",
"prereqs" => {
"runtime" => {
"Net::SMTPS" => 0,
"Mail::DKIM::PrivateKey" => 0,
"Mail::DKIM::Signer" => 0,
"Mail::DKIM::TextWrap" => 0,
}
}
},
"imap_fetch" => {
"description" => "Retrieve DMARC reports from an IMAP account",
"prereqs" => {
"runtime" => {
"Net::IMAP::Simple" => 0,
}
}
}
},
"recursive_test_files" => 1,
"script_files" => [
"bin/dmarc_update_public_suffix_list",
"bin/dmarc_send_reports",
Expand All @@ -107,24 +137,61 @@ my %module_build_args = (
"Test::File::ShareDir" => 0,
"Test::More" => 0,
"Test::Output" => 0
},
"develop_requires" => {
"Test::Pod" => "1.41"
},
"meta_add" => {
},
"meta_merge" => {
"prereqs" => {
"test" => {
"recommends" => {
"XML::SAX::ParserFactory" => "0",
"XML::Validator::Schema" => "0"
},
},
"develop" => {
"requires" => {
"Test::Pod" => "1.41"
},
"suggests" => {
"Test::Perl::Critic" => "0"
}
},
},
"resources" => {
"bugtracker" => "https://github.com/msimerson/mail-dmarc/issues",
"homepage" => "https://github.com/msimerson/mail-dmarc/wiki",
"repository" => "https://github.com/msimerson/mail-dmarc",
},
"x_contributors" => [
"Benny Pedersen <me\@junc.eu>",
"Jean Paul Galea <jeanpaul\@yubico.com>",
"Marisa Clardy <marisa\@clardy.eu>",
"Priyadi Iman Nurcahyo <priyadi\@priyadi.net>",
"Ricardo Signes <rjbs\@cpan.org>"
],
}
);

};

my %fallback_build_requires = (
my $fallback_build_requires = {
"Module::Build" => "0.3601",
"Test::Exception" => 0,
"Test::File::ShareDir" => 0,
"Test::More" => 0,
"Test::Output" => 0
);

};

unless ( eval { Module::Build->VERSION(0.4004) } ) {
delete $module_build_args{test_requires};
$module_build_args{build_requires} = \%fallback_build_requires;
delete $module_build_args->{test_requires};
$module_build_args->{build_requires} = $fallback_build_requires;
}

my $build = Module::Build->new(%module_build_args);
my $build = Module::Build->new(%$module_build_args);

# if ( $build->prompt( "Database engine", "sqlite" ) ) {
# $build->notes( 'DB_ENGINE' => $build->args('db_engine') );
# }

$build->create_build_script;
3 changes: 2 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bin/dmarc_update_public_suffix_list
bin/dmarc_view_reports
bin/install_deps.pl
Build.PL
Changes
Changes.md
DEVELOP.md
example/report_cgi.png
FAQ.md
Expand Down Expand Up @@ -43,6 +43,7 @@ lib/Mail/DMARC/Result/Reason.pm
LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
META.json
META.yml
README.md
Expand Down
13 changes: 13 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
.git
.release
.tar.gz
.travis.yml
^_build
^blib
^Makefile$
^Build$
^MANIFEST\.bak$
^MYMETA.
dmarc_reports.sqlite
t/reports-test.sqlite
Loading

0 comments on commit c1f982c

Please sign in to comment.