From: Graham Knop Date: Thu, 13 Aug 2020 08:57:56 +0000 (+0200) Subject: convert to Distar X-Git-Tag: v0.18~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=commitdiff_plain;h=918432f960efb788d9e9ba67be874cba55fd7746;hp=2b79283a8e04ad092d02776e23fdfce4d31e2595 convert to Distar --- diff --git a/.shipit b/.shipit deleted file mode 100644 index 59b9941..0000000 --- a/.shipit +++ /dev/null @@ -1,5 +0,0 @@ -# auto-generated shipit config file. -steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN - -svn.tagpattern = http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Plugin-Session-State-Cookie/tags/%v -CheckChangeLog.files = Changes diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP deleted file mode 100644 index 1aa3d8d..0000000 --- a/MANIFEST.SKIP +++ /dev/null @@ -1,40 +0,0 @@ -# Avoid version control files. -\bRCS\b -\bCVS\b -,v$ -\B\.svn\b -\B\.git\b -\B\.gitignore\b - -# Avoid Makemaker generated and utility files. -\bMakefile$ -\bblib -\bMakeMaker-\d -\bpm_to_blib$ -\bblibdirs$ -^MANIFEST\.SKIP$ - -# Avoid Module::Build generated and utility files. -\bBuild$ -\b_build -\bBuild.PL$ - -# Avoid temp and backup files. -~$ -\.tmp$ -\.old$ -\.bak$ -\#$ -\b\.# -^..*\.sw[po]$ -\.DS_Store$ - -# prereq tests may fail due to optionals -99_prereq\.t$ - -# No tarballs! -\.gz$ - -\.shipit$ - -^Catalyst-Plugin-Session-State-Cookie diff --git a/Makefile.PL b/Makefile.PL index fc385ab..a032325 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,22 +1,97 @@ -use inc::Module::Install 0.87; +use strict; +use warnings FATAL => 'all'; +use 5.006; -name 'Catalyst-Plugin-Session-State-Cookie'; -all_from 'lib/Catalyst/Plugin/Session/State/Cookie.pm'; +my %META = ( + name => 'Catalyst-Plugin-Session-State-Cookie', + license => 'perl_5', + prereqs => { + configure => { requires => { + 'ExtUtils::MakeMaker' => 0, + } }, + build => { requires => { + } }, + test => { + requires => { + 'Test::More' => '0.88', + }, + }, + runtime => { + requires => { + 'Catalyst' => '5.80005', + 'Catalyst::Plugin::Session' => '0.27', + 'MRO::Compat' => 0, + 'Moose' => 0, + 'namespace::autoclean' => 0, + }, + }, + develop => { + requires => { + }, + }, + }, + resources => { + repository => { + url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session-State-Cookie.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Session-State-Cookie.git', + type => 'git', + }, + bugtracker => { + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Session-State-Cookie', + mailto => 'bug-Catalyst-Plugin-Session-State-Cookie@rt.cpan.org', + }, + license => [ 'http://dev.perl.org/licenses/' ], + }, + no_index => { + directory => [ 't', 'xt' ] + }, + x_authority => 'cpan:NUFFIN', +); -requires 'Catalyst' => '5.80005'; -requires 'Catalyst::Plugin::Session' => '0.27'; -requires 'MRO::Compat'; -requires 'Moose'; -requires 'namespace::autoclean'; -test_requires 'Moose'; -test_requires 'Test::More'; +my %MM_ARGS = (); -auto_install; -resources repository => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session-State-Cookie.git'; +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -if ($Module::Install::AUTHOR) { - system("pod2text lib/Catalyst/Plugin/Session/State/Cookie.pm > README") - and die; +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; + +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; +$MM_ARGS{PL_FILES} ||= {}; +$MM_ARGS{NORECURS} = 1 + if not exists $MM_ARGS{NORECURS}; + +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; } -WriteAll; +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; + +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; + +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ########################################################### diff --git a/maint/Makefile.PL.include b/maint/Makefile.PL.include new file mode 100644 index 0000000..8fd36b0 --- /dev/null +++ b/maint/Makefile.PL.include @@ -0,0 +1,5 @@ +BEGIN { -e 'Distar' or system("git clone https://github.com/p5sagit/Distar.git") } +use lib 'Distar/lib'; +use Distar; + +author 'Yuval Kogman ';