diff --git a/Syntax-Keyword-Junction-0.003008.tar.gz b/Syntax-Keyword-Junction-0.003008.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6fe573f7d1ba4127a315e7ec2f02bbba4d996523 Binary files /dev/null and b/Syntax-Keyword-Junction-0.003008.tar.gz differ diff --git a/perl-Syntax-Keyword-Junction.spec b/perl-Syntax-Keyword-Junction.spec new file mode 100644 index 0000000000000000000000000000000000000000..314adc1458aac0abe0cb8ae7f65ef1b890ae6597 --- /dev/null +++ b/perl-Syntax-Keyword-Junction.spec @@ -0,0 +1,101 @@ +# Perform optional tests +%bcond_without perl_Syntax_Keyword_Junction_enables_optional_test + +Name: perl-Syntax-Keyword-Junction +Version: 0.003008 +Release: 1 +Summary: Perl6 style Junction operators in Perl5 +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/Syntax-Keyword-Junction +Source0: https://cpan.metacpan.org/authors/id/F/FR/FREW/Syntax-Keyword-Junction-%{version}.tar.gz +BuildArch: noarch +BuildRequires: coreutils +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time: +BuildRequires: perl(if) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(Sub::Exporter::Progressive) >= 0.001006 +# Tests: +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Requires) >= 0.07 +%if %{with perl_Syntax_Keyword_Junction_enables_optional_test} +# Optional tests: +BuildRequires: perl(Sub::Exporter) >= 0.986 +BuildRequires: perl(syntax) +%endif +Requires: perl(if) +Requires: perl(overload) +Requires: perl(Sub::Exporter::Progressive) >= 0.001006 + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Sub::Exporter::Progressive|Test::More|Test::Requires)\\)$ + +%description +This is a lightweight module which provides 'Junction' operators, the most +commonly used being any and all. Inspired by the Perl6 design docs, +. + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Test::More) >= 0.88 +Requires: perl(Test::Requires) >= 0.07 +%if %{with perl_Syntax_Keyword_Junction_enables_optional_test} +Requires: perl(if) +Requires: perl(Sub::Exporter) >= 0.986 +%endif + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + +%prep +%setup -q -n Syntax-Keyword-Junction-%{version} +for F in t/release-pod-syntax.t \ +%if %{without perl_Syntax_Keyword_Junction_enables_optional_test} + t/smartmatch.t t/syntax.t \ +%endif +; do + rm "$F" + perl -i -ne 'print $_ unless m{^\E'"$F"'\Q}' MANIFEST +done + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} + +%install +%{make_install} +%{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + +%check +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') +make test + +%files +%license LICENSE +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Wed Mar 20 2024 konglidong - 0.003008-1 +- package init diff --git a/perl-Syntax-Keyword-Junction.yaml b/perl-Syntax-Keyword-Junction.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b10e1523338761c704daa475a726565f76b695bc --- /dev/null +++ b/perl-Syntax-Keyword-Junction.yaml @@ -0,0 +1,4 @@ +version_control: metacpan +src_repo: Syntax-Keyword-Junction +tag_prefix: "" +separator: "."