Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/perl-JSON-XS.git#de4527b78436542112252f4fb3e7527304e2d23a
This commit is contained in:
parent
ac9489c8ca
commit
6058574d5d
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
@ -2,7 +2,7 @@ Name: perl-JSON-XS
|
||||
Summary: JSON serializing/de-serializing, done correctly and fast
|
||||
Epoch: 1
|
||||
Version: 4.03
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/JSON-XS
|
||||
Source0: https://cpan.metacpan.org/modules/by-module/JSON/JSON-XS-%{version}.tar.gz
|
||||
@ -14,6 +14,7 @@ BuildRequires: perl-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Canary::Stability)
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: sed
|
||||
# Module Runtime
|
||||
@ -38,29 +39,54 @@ BuildRequires: perl(warnings)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
%{?perl_default_filter}
|
||||
%{?perl_default_subpackage_tests}
|
||||
|
||||
%description
|
||||
This module converts Perl data structures to JSON and vice versa. Its
|
||||
primary goal is to be correct and its secondary goal is to be fast. To
|
||||
reach the latter goal it was written in C.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n JSON-XS-%{version}
|
||||
|
||||
sed -i 's/\r//' t/*
|
||||
perl -pi -e 's|^#!/opt/bin/perl|#!%{__perl}|' eg/*
|
||||
perl -MConfig -pi -e 's|^#!/opt/bin/perl|$Config{startperl}|' eg/*
|
||||
chmod -c -x eg/*
|
||||
|
||||
# Help generators to recognize Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 </dev/null
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
# 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
|
||||
# Correct permissions
|
||||
%{_fixperms} -c %{buildroot}
|
||||
|
||||
%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
|
||||
@ -71,7 +97,13 @@ make test
|
||||
%{perl_vendorarch}/JSON/
|
||||
%{_mandir}/man[13]/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 22 2021 Petr Pisar <ppisar@redhat.com> - 1:4.03-3
|
||||
- Package tests manually
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.03-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
4
tests/upstream-tests.fmf
Normal file
4
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: Upstream tests
|
||||
component: perl-JSON-XS
|
||||
require: perl-JSON-XS-tests
|
||||
test: /usr/libexec/perl-JSON-XS/test
|
Loading…
Reference in New Issue
Block a user