summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Göbel2017-03-31 20:45:21 +0200
committerStefan Göbel2017-03-31 20:45:21 +0200
commit6244e362ecee38ca2b58e439afa9b2176efda308 (patch)
tree9bffca9ef0e852385fc6b4fe2c1942e1ac78f654
downloadaur-6244e362ecee38ca2b58e439afa9b2176efda308.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD58
-rw-r--r--README20
-rw-r--r--fix-recommendedprereqs-t.patch65
4 files changed, 161 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a9277c713bdd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = perl-dist-zilla-plugins-cjm
+ pkgdesc = A collection of Dist::Zilla plugins by CJM.
+ pkgver = 4.27
+ pkgrel = 1
+ url = https://metacpan.org/release/Dist-Zilla-Plugins-CJM
+ arch = any
+ license = PerlArtistic
+ license = GPL
+ depends = perl-dist-zilla
+ options = !emptydirs
+ options = purge
+ source = http://search.cpan.org/CPAN/authors/id/C/CJ/CJM/Dist-Zilla-Plugins-CJM-4.27.tar.gz
+ source = fix-recommendedprereqs-t.patch
+ sha256sums = 86fd4e68b3e444a2ecb8990136362fb14060c6c46abddddb497aa94c26e8d921
+ sha256sums = 0e96d3f444f6db0172b66f3eb5cea6b846a9e2c70fb154e2e76dc322517b25f5
+
+pkgname = perl-dist-zilla-plugins-cjm
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0c5a1b64f279
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Stefan Göbel <aur —at— subtype —dot— de>
+
+pkgname='perl-dist-zilla-plugins-cjm'
+_module='Dist-Zilla-Plugins-CJM'
+_author='C/CJ/CJM'
+pkgver='4.27'
+pkgrel='1'
+pkgdesc='A collection of Dist::Zilla plugins by CJM.'
+arch=('any')
+url="https://metacpan.org/release/$_module"
+license=('PerlArtistic' 'GPL')
+options=('!emptydirs' 'purge')
+depends=('perl-dist-zilla')
+source=(
+ "http://search.cpan.org/CPAN/authors/id/$_author/$_module-$pkgver.tar.gz"
+ 'fix-recommendedprereqs-t.patch'
+)
+sha256sums=(
+ '86fd4e68b3e444a2ecb8990136362fb14060c6c46abddddb497aa94c26e8d921'
+ '0e96d3f444f6db0172b66f3eb5cea6b846a9e2c70fb154e2e76dc322517b25f5'
+)
+
+prepare() {
+ cd "$_module-$pkgver"
+ patch -p0 -uN -i '../fix-recommendedprereqs-t.patch'
+}
+
+build() {
+ (
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT='1' PERL_AUTOINSTALL='--skipdeps'
+ cd "$_module-$pkgver"
+ perl Makefile.PL INSTALLDIRS='vendor'
+ make
+ )
+}
+
+check() {
+ (
+ cd "$_module-$pkgver"
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ export PERL_MM_USE_DEFAULT='1'
+ make test
+ )
+}
+
+package() {
+ (
+ cd "$_module-$pkgver"
+ unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+ make install INSTALLDIRS='vendor' DESTDIR="$pkgdir"
+ find "$pkgdir" -name .packlist -delete
+ find "$pkgdir" -name perllocal.pod -delete
+ find "$pkgdir" -type d -empty -delete
+ )
+}
+
+#:indentSize=3:tabSize=3:noTabs=true:mode=shellscript:maxLineLen=87: \ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 000000000000..109bab603d37
--- /dev/null
+++ b/README
@@ -0,0 +1,20 @@
+This repository contains the PKGBUILD to create the «perl-dist-zilla-plugins-cjm»
+package for Arch Linux, providing the following Perl modules:
+
+ Dist::Zilla::Plugin::ArchiveRelease
+ Dist::Zilla::Plugin::GitVersionCheckCJM
+ Dist::Zilla::Plugin::MakeMaker::Custom
+ Dist::Zilla::Plugin::Metadata
+ Dist::Zilla::Plugin::ModuleBuild::Custom
+ Dist::Zilla::Plugin::RecommendedPrereqs
+ Dist::Zilla::Plugin::Test::PrereqsFromMeta
+ Dist::Zilla::Plugin::VersionFromModule
+ Dist::Zilla::Role::HashDumper
+ Dist::Zilla::Role::ModuleInfo
+
+See https://aur.archlinux.org/packages/perl-dist-zilla-plugins-cjm/.
+
+Note:
+
+ Upstream test t/recommendedprereqs.t will fail, the patch included here was
+ created based on the fork at https://github.com/mla/dist-zilla-plugins-cjm/. \ No newline at end of file
diff --git a/fix-recommendedprereqs-t.patch b/fix-recommendedprereqs-t.patch
new file mode 100644
index 000000000000..d52afea2f875
--- /dev/null
+++ b/fix-recommendedprereqs-t.patch
@@ -0,0 +1,65 @@
+--- t/recommendedprereqs.t 2015-08-29 23:09:03.000000000 +0200
++++ t/recommendedprereqs.t 2017-03-29 22:50:35.000000000 +0200
+@@ -3,7 +3,8 @@
+
+ use strict;
+ use warnings;
+-use Test::More 0.88 tests => 4; # done_testing
++use version;
++use Test::More 0.88;
+
+ use Test::DZil qw(Builder simple_ini);
+ use Parse::CPAN::Meta;
+@@ -22,21 +23,37 @@
+
+ my $meta = Parse::CPAN::Meta->load_file($tzil->tempdir->file('build/META.yml'));
+
+-is_deeply(
+- $meta->{prereqs}{runtime}{recommends},
+- { 'Foo::Bar' => '1.00',
+- 'Foo::Baz' => 0 },
+- 'runtime recommends'
+-);
+-
+-is($meta->{prereqs}{runtime}{suggests}, undef, 'runtime suggests');
+-
+-is($meta->{prereqs}{test}{recommends}, undef, 'test recommends');
++my $ver = version->new($meta->{'meta-spec'}{version});
++diag "CPAN::Meta::Spec = $ver";
+
+-is_deeply(
+- $meta->{prereqs}{test}{suggests},
+- { 'Test::Other' => 0 },
+- 'test suggests'
+-);
++if ($ver >= version->new('2')) { # See CPAN::Meta::Spec
++ is_deeply(
++ $meta->{prereqs}{runtime}{recommends},
++ { 'Foo::Bar' => '1.00',
++ 'Foo::Baz' => 0 },
++ 'runtime recommends'
++ );
++
++ is($meta->{prereqs}{runtime}{suggests}, undef, 'runtime suggests');
++
++ is($meta->{prereqs}{test}{recommends}, undef, 'test recommends');
++
++ is_deeply(
++ $meta->{prereqs}{test}{suggests},
++ { 'Test::Other' => 0 },
++ 'test suggests'
++ );
++} elsif ($ver >= version->new('1.4')) {
++ is_deeply(
++ $meta->{recommends},
++ {
++ 'Foo::Bar' => '1.00',
++ 'Foo::Baz' => 0,
++ },
++ 'runtime recommends'
++ );
++} else {
++ plan skip_all => "Unexpected CPAN::Meta::Spec version '$ver'";
++}
+
+ done_testing;