|
|
50b77d |
%{?scl:%scl_package perl-CPAN-Meta-YAML}
|
|
|
50b77d |
%{!?scl:%global pkg_name %{name}}
|
|
|
50b77d |
|
|
|
50b77d |
Name: %{?scl_prefix}perl-CPAN-Meta-YAML
|
|
|
50b77d |
Version: 0.010
|
|
|
50b77d |
Release: 3%{?dist}
|
|
|
50b77d |
Summary: Read and write a subset of YAML for CPAN Meta files
|
|
|
50b77d |
License: GPL+ or Artistic
|
|
|
50b77d |
Group: Development/Libraries
|
|
|
50b77d |
URL: http://search.cpan.org/dist/CPAN-Meta-YAML/
|
|
|
50b77d |
Source0: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/CPAN-Meta-YAML-%{version}.tar.gz
|
|
|
50b77d |
Patch0: CPAN-Meta-YAML-0.009-TM094.patch
|
|
|
50b77d |
Patch1: CPAN-Meta-YAML-0.009-old-Test::More.patch
|
|
|
50b77d |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
|
|
|
50b77d |
BuildArch: noarch
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Carp)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Exporter)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(ExtUtils::MakeMaker)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(File::Spec)
|
|
|
50b77d |
# Tests:
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(IO::Handle)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(IPC::Open3)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(File::Spec::Functions)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(File::Temp)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Test::More)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(YAML)
|
|
|
50b77d |
# Don't run extra tests when bootstrapping as many of those
|
|
|
50b77d |
# tests' dependencies build-require this package
|
|
|
50b77d |
%if 0%{?fedora} && 0%{!?perl_bootstrap:1} && ! ( 0%{?scl:1} )
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Test::CPAN::Meta)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Test::Pod)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Test::Requires)
|
|
|
50b77d |
BuildRequires: %{?scl_prefix}perl(Test::Version)
|
|
|
50b77d |
%endif
|
|
|
50b77d |
%{?scl:%global perl_version %(scl enable %{scl} 'eval "`perl -V:version`"; echo $version')}
|
|
|
50b77d |
%{!?scl:%global perl_version %(eval "`perl -V:version`"; echo $version)}
|
|
|
50b77d |
Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%{perl_version})
|
|
|
50b77d |
Requires: %{?scl_prefix}perl(Carp)
|
|
|
50b77d |
Requires: %{?scl_prefix}perl(Exporter)
|
|
|
50b77d |
|
|
|
50b77d |
# We need to patch the test suite if we have Test::More < 0.94
|
|
|
50b77d |
%{?scl:%global quite_old_test_more %(scl enable %{scl} "perl -MTest::More -e 'print ((\\$Test::More::VERSION < 0.94) ? 1 : 0)'" 2>/dev/null || echo 0)}
|
|
|
50b77d |
%{!?scl:%global quite_old_test_more %(perl -MTest::More -e 'print ($Test::More::VERSION < 0.94 ? 1 : 0);' 2>/dev/null || echo 0)}
|
|
|
50b77d |
# We need to patch the test suite again if we have Test::More < 0.88
|
|
|
50b77d |
%{?scl:%global old_test_more %(scl enable %{scl} "perl -MTest::More -e 'print ((\\$Test::More::VERSION < 0.88) ? 1 : 0)'" 2>/dev/null || echo 0)}
|
|
|
50b77d |
%{!?scl:%global old_test_more %(perl -MTest::More -e 'print ($Test::More::VERSION < 0.88 ? 1 : 0);' 2>/dev/null || echo 0)}
|
|
|
50b77d |
|
|
|
50b77d |
%description
|
|
|
50b77d |
This module implements a subset of the YAML specification for use in reading
|
|
|
50b77d |
and writing CPAN metadata files like META.yml and MYMETA.yml. It should not be
|
|
|
50b77d |
used for any other general YAML parsing or generation task.
|
|
|
50b77d |
|
|
|
50b77d |
%prep
|
|
|
50b77d |
%setup -q -n CPAN-Meta-YAML-%{version}
|
|
|
50b77d |
|
|
|
50b77d |
# We need to patch the test suite if we have Test::More < 0.94
|
|
|
50b77d |
%if 0%{quite_old_test_more}
|
|
|
50b77d |
%patch0
|
|
|
50b77d |
%endif
|
|
|
50b77d |
|
|
|
50b77d |
# We need to patch the test suite again if we have Test::More < 0.88
|
|
|
50b77d |
%if 0%{old_test_more}
|
|
|
50b77d |
%patch1
|
|
|
50b77d |
%endif
|
|
|
50b77d |
|
|
|
50b77d |
%build
|
|
|
50b77d |
%{?scl:scl enable %{scl} "}
|
|
|
50b77d |
perl Makefile.PL INSTALLDIRS=vendor UNINST=0
|
|
|
50b77d |
%{?scl:"}
|
|
|
50b77d |
%{?scl:scl enable %{scl} "}
|
|
|
50b77d |
make %{?_smp_mflags}
|
|
|
50b77d |
%{?scl:"}
|
|
|
50b77d |
|
|
|
50b77d |
%install
|
|
|
50b77d |
rm -rf %{buildroot}
|
|
|
50b77d |
%{?scl:scl enable %{scl} "}
|
|
|
50b77d |
make pure_install DESTDIR=%{buildroot}
|
|
|
50b77d |
%{?scl:"}
|
|
|
50b77d |
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
|
|
50b77d |
%{_fixperms} %{buildroot}
|
|
|
50b77d |
|
|
|
50b77d |
%check
|
|
|
50b77d |
%{?scl:scl enable %{scl} "}
|
|
|
50b77d |
make test
|
|
|
50b77d |
%{?scl:"}
|
|
|
50b77d |
%if 0%{?fedora} && 0%{!?perl_bootstrap:1} && ! ( 0%{?scl:1} )
|
|
|
50b77d |
%{?scl:scl enable %{scl} '}
|
|
|
50b77d |
make test TEST_FILES="xt/*/*.t"
|
|
|
50b77d |
%{?scl:'}
|
|
|
50b77d |
%endif
|
|
|
50b77d |
|
|
|
50b77d |
%clean
|
|
|
50b77d |
rm -rf %{buildroot}
|
|
|
50b77d |
|
|
|
50b77d |
%files
|
|
|
50b77d |
%doc Changes LICENSE README
|
|
|
50b77d |
%{perl_vendorlib}/CPAN/
|
|
|
50b77d |
%{_mandir}/man3/CPAN::Meta::YAML.3pm*
|
|
|
50b77d |
|
|
|
50b77d |
%changelog
|
|
|
50b77d |
* Tue Feb 11 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-3
|
|
|
50b77d |
- Fixed getting of *old_test_more
|
|
|
50b77d |
- Resolves: rhbz#1063206
|
|
|
50b77d |
|
|
|
50b77d |
* Tue Feb 04 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-2
|
|
|
50b77d |
- Disable release tests
|
|
|
50b77d |
- Resolves: rhbz#1061038, rhbz#1063206
|
|
|
50b77d |
|
|
|
50b77d |
* Tue Nov 12 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-1
|
|
|
50b77d |
- 0.010 bump
|
|
|
50b77d |
- Update dependencies
|
|
|
50b77d |
|
|
|
50b77d |
* Tue Jun 18 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.008-2
|
|
|
50b77d |
- Update a condition for BRs
|
|
|
50b77d |
|
|
|
50b77d |
* Tue Feb 12 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.008-1
|
|
|
50b77d |
- Stack package - initial release
|