# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-Test-CPAN-Meta-JSON Version: 0.16 Release: 25.%{__distinit}%{__distvers} Summary: Validate a META.json file within a CPAN distribution License: Artistic-2.0 URL: https://metacpan.org/release/Test-CPAN-Meta-YAML Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-CPAN-Meta-JSON-%{version}.tar.gz Patch0: Test-CPAN-Meta-JSON-0.16-utf8.patch BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(IO::File) BuildRequires: perl(JSON) >= 2.15 BuildRequires: perl(strict) BuildRequires: perl(Test::Builder) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Test::Builder::Tester) BuildRequires: perl(Test::More) # Optional Tests BuildRequires: perl(Test::CPAN::Meta) BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 0.08 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description This module was written to ensure that a META.json file, provided with a standard distribution uploaded to CPAN, meets the specifications that are slowly being introduced to module uploads, via the use of ExtUtils::MakeMaker, Module::Build and Module::Install. See CPAN::Meta for further details of the CPAN Meta Specification. %prep %setup -q -n Test-CPAN-Meta-JSON-%{version} # Recode LICENSE as UTF-8 %patch -P 0 %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test AUTOMATED_TESTING=1 %files %license LICENSE %doc Changes README examples/ %{perl_vendorlib}/Test/ %{_mandir}/man3/Test::CPAN::Meta::JSON.3* %{_mandir}/man3/Test::CPAN::Meta::JSON::Version.3* %changelog * Sun May 14 2023 Paul Howarth - 0.16-25 - Spec tidy-up - Use SPDX-format license tag - Avoid use of deprecated patch syntax - Use %%license unconditionally * Mon Jun 3 2019 Paul Howarth - 0.16-13 - Perl 5.30 rebuild * Wed Apr 11 2018 Paul Howarth - 0.16-9 - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Thu Sep 29 2016 Paul Howarth - 0.16-5 - BR: perl-generators where available - Simplify find command using -delete * Wed Jan 14 2015 Paul Howarth - 0.16-1 - Update to 0.16 - Fixed license fields in META.json to be lists - Extended META test suite - Added '2.0' as an alias to '2' version spec. - License MUST be a list of strings - Classify buildreqs by usage - Update UTF8 patch * Mon Sep 1 2014 Paul Howarth - 0.15-4 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Sun Jul 21 2013 Paul Howarth - 0.15-1 - Update to 0.15 - Changes file dates changed to meet W3CDTF standards * Tue Aug 21 2012 Paul Howarth - 0.14-1 - Update to 0.14 - Added minimum perl version (5.006) - Reworked Makefile.PL for clarity - Implemented Perl::Critic suggestions - Added meta_json_ok test and example - Several Version.pm updates - Update UTF8 patch * Sun Jul 1 2012 Paul Howarth - 0.13-2 - Perl 5.16 rebuild * Fri Apr 20 2012 Paul Howarth - 0.13-1 - Update to 0.13 - Further spelling fix - Removed DSLIP info * Tue Apr 17 2012 Paul Howarth - 0.12-1 - Update to 0.12 - CPAN RT#76609: Spelling fix * Sun Apr 15 2012 Paul Howarth - 0.11-1 - Update to 0.11 - CPAN RT#74317: imported url validation from CPAN::Meta - CPAN RT#66692: updated license type - Updates to examples - BR: perl(Test::CPAN::Meta) rather than perl(Test::CPAN::Meta::YAML) - Don't need to remove empty directories from buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT * Wed Aug 10 2011 Paul Howarth - 0.10-1 - Initial RPM version