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.git#9f9f4a764b97f1a36cb12d4da3726d0d46f581c1
This commit is contained in:
parent
4c5d8b4cc5
commit
adda0dfc23
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}
|
@ -1,7 +1,7 @@
|
||||
Name: perl-JSON
|
||||
Summary: Parse and convert to JSON (JavaScript Object Notation)
|
||||
Version: 4.03
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPL+ or Artistic
|
||||
|
||||
URL: https://metacpan.org/release/JSON
|
||||
@ -25,6 +25,7 @@ BuildRequires: perl(:VERSION) >= 5.5.30
|
||||
BuildRequires: perl(base)
|
||||
BuildRequires: perl(bytes)
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(Data::Dumper)
|
||||
BuildRequires: perl(Encode)
|
||||
@ -50,19 +51,32 @@ BuildRequires: perl(warnings)
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(JSON::(Backend::PP|backportPP::Boolean|Boolean|PP|PP::IncrParser)\\)
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(JSON::(backportPP|backportPP::Boolean)\\)
|
||||
|
||||
%{?perl_default_subpackage_tests}
|
||||
|
||||
%description
|
||||
This module converts between JSON (JavaScript Object Notation) and Perl
|
||||
data structure into each other. For JSON, see http://www.crockford.com/JSON/.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: coreutils
|
||||
Requires: perl-Test-Harness
|
||||
Requires: perl(Tie::IxHash)
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n JSON-%{version}
|
||||
|
||||
# make rpmlint happy...
|
||||
find . -type f -exec chmod -c -x {} +
|
||||
find t/ -type f -exec perl -pi -e 's|^#! perl|#!/usr/bin/perl|' {} +
|
||||
sed -i 's/\r//' README t/*
|
||||
# Help generators to recognize Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
%build
|
||||
/usr/bin/perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
@ -70,10 +84,28 @@ sed -i 's/\r//' README t/*
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/00_pod.t
|
||||
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/bash
|
||||
# t/20_unknown.t writes to CWD
|
||||
DIR=$(mktemp -d)
|
||||
cp -a %{_libexecdir}/%{name}/t "$DIR"
|
||||
unset PERL_JSON_BACKEND PERL_JSON_DEBUG PERL_JSON_PP_USE_B
|
||||
pushd "$DIR"
|
||||
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
popd
|
||||
rm -r "$DIR"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
# Correct permissions
|
||||
%{_fixperms} -c %{buildroot}
|
||||
|
||||
%check
|
||||
unset PERL_JSON_BACKEND PERL_JSON_DEBUG PERL_JSON_PP_USE_B
|
||||
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
||||
%{make_build} test
|
||||
|
||||
%files
|
||||
@ -81,7 +113,13 @@ unset PERL_JSON_BACKEND PERL_JSON_DEBUG PERL_JSON_PP_USE_B
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 22 2021 Petr Pisar <ppisar@redhat.com> - 4.03-3
|
||||
- Package tests manually
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 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
|
||||
require: perl-JSON-tests
|
||||
test: /usr/libexec/perl-JSON/test
|
Loading…
Reference in New Issue
Block a user