f960e4
%if ! (0%{?rhel})
f960e4
# Run extra test
f960e4
%bcond_without perl_Package_Stash_XS_enables_extra_test
f960e4
# Run optional test
f960e4
%bcond_without perl_Package_Stash_XS_enables_optional_test
f960e4
%else
f960e4
%bcond_with perl_Package_Stash_XS_enables_extra_test
f960e4
%bcond_with perl_Package_Stash_XS_enables_optional_test
f960e4
%endif
f960e4
f960e4
Name:		perl-Package-Stash-XS
f960e4
Version:	0.28
f960e4
Release:	17%{?dist}
f960e4
Summary:	Faster and more correct implementation of the Package::Stash API
f960e4
Group:		Development/Libraries
f960e4
License:	GPL+ or Artistic
f960e4
URL:		http://search.cpan.org/dist/Package-Stash-XS/
f960e4
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-%{version}.tar.gz
f960e4
Patch1:		Package-Stash-XS-0.27-old-Test::More.patch
f960e4
# Module Build
f960e4
BuildRequires:	coreutils
f960e4
BuildRequires:	findutils
f960e4
BuildRequires:	gcc
f960e4
BuildRequires:	make
f960e4
BuildRequires:	perl-interpreter >= 3:5.8.1
f960e4
%if "%{?rhel}" != "5"
f960e4
BuildRequires:	perl-devel
f960e4
%endif
f960e4
BuildRequires:	perl-generators
f960e4
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
f960e4
# Module Runtime
f960e4
BuildRequires:	perl(strict)
f960e4
BuildRequires:	perl(warnings)
f960e4
BuildRequires:	perl(XSLoader)
f960e4
# Test Suite
f960e4
BuildRequires:	perl(B)
f960e4
BuildRequires:	perl(base)
f960e4
BuildRequires:	perl(constant)
f960e4
BuildRequires:	perl(File::Find)
f960e4
BuildRequires:	perl(File::Temp)
f960e4
BuildRequires:	perl(lib)
f960e4
BuildRequires:	perl(Scalar::Util)
f960e4
BuildRequires:	perl(Symbol)
f960e4
BuildRequires:	perl(Test::Fatal)
f960e4
BuildRequires:	perl(Test::More)
f960e4
BuildRequires:	perl(Test::Requires)
f960e4
%if %{with perl_Package_Stash_XS_enables_optional_test}
f960e4
# Optional Tests
f960e4
%if 0%{?fedora} > 15 || 0%{?rhel} > 6
f960e4
BuildRequires:	perl(Package::Anon)
f960e4
%endif
f960e4
%if "%{?rhel}" != "5"
f960e4
BuildRequires:	perl(Variable::Magic)
f960e4
%endif
f960e4
%endif
f960e4
%if %{with perl_Package_Stash_XS_enables_extra_test}
f960e4
# Author Tests
f960e4
%if ! (0%{?rhel} >= 7)
f960e4
BuildRequires:	perl(Test::LeakTrace)
f960e4
%endif
f960e4
# Release Tests
f960e4
BuildRequires:	perl(Pod::Coverage::TrustPod)
f960e4
BuildRequires:	perl(Test::EOL)
f960e4
BuildRequires:	perl(Test::NoTabs)
f960e4
BuildRequires:	perl(Test::Pod)
f960e4
BuildRequires:	perl(Test::Pod::Coverage)
f960e4
%endif
f960e4
# Dependencies
f960e4
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
f960e4
f960e4
# Don't "provide" private Perl libs
f960e4
%{?perl_default_filter}
f960e4
f960e4
%description
f960e4
This is a back-end for Package::Stash, which provides the functionality in a
f960e4
way that's less buggy and much faster. It will be used by default if it's
f960e4
installed, and should be preferred in all environments with a compiler.
f960e4
f960e4
%prep
f960e4
%setup -q -n Package-Stash-XS-%{version}
f960e4
f960e4
# Patch test suite to work with old Test::More versions if necessary
f960e4
%if "%{?rhel}" == "5"
f960e4
%patch1 -p1
f960e4
%endif
f960e4
f960e4
%build
f960e4
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
f960e4
make %{?_smp_mflags}
f960e4
f960e4
%install
f960e4
rm -rf %{buildroot}
f960e4
make pure_install DESTDIR=%{buildroot}
f960e4
find %{buildroot} -type f -name .packlist -delete
f960e4
find %{buildroot} -type f -name '*.bs' -empty -delete
f960e4
%{_fixperms} %{buildroot}
f960e4
f960e4
%check
f960e4
make test
f960e4
%if %{with perl_Package_Stash_XS_enables_extra_test}
f960e4
%if ! (0%{?rhel} >= 7)
f960e4
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
f960e4
%else
f960e4
make test TEST_FILES="$(echo $(find xt/release/ -name '*.t'))"
f960e4
%endif
f960e4
%endif
f960e4
f960e4
%files
f960e4
%if 0%{?_licensedir:1}
f960e4
%license LICENSE
f960e4
%else
f960e4
%doc LICENSE
f960e4
%endif
f960e4
%doc Changes README
f960e4
%{perl_vendorarch}/auto/Package/
f960e4
%{perl_vendorarch}/Package/
f960e4
%{_mandir}/man3/Package::Stash::XS.3*
f960e4
f960e4
%changelog
f960e4
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-17
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f960e4
f960e4
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-16
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f960e4
f960e4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-15
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f960e4
f960e4
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-14
f960e4
- Perl 5.26 rebuild
f960e4
f960e4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-13
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f960e4
f960e4
* Thu Jul 21 2016 Paul Howarth <paul@city-fan.org> - 0.28-12
f960e4
- Fix FTBFS when perl is not in the SRPM build root
f960e4
f960e4
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-11
f960e4
- Perl 5.24 rebuild
f960e4
f960e4
* Tue Apr 19 2016 Paul Howarth <paul@city-fan.org> - 0.28-10
f960e4
- Classify buildreqs by usage
f960e4
- Use %%license where possible
f960e4
- Simplify find commands using -empty and -delete
f960e4
f960e4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-9
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f960e4
f960e4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-8
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f960e4
f960e4
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-7
f960e4
- Perl 5.22 rebuild
f960e4
f960e4
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-6
f960e4
- Perl 5.20 rebuild
f960e4
f960e4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-5
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f960e4
f960e4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-4
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f960e4
f960e4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.28-3
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f960e4
f960e4
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 0.28-2
f960e4
- Perl 5.18 rebuild
f960e4
f960e4
* Tue Jul 16 2013 Paul Howarth <paul@city-fan.org> - 0.28-1
f960e4
- Update to 0.28
f960e4
  - Fix test issue
f960e4
f960e4
* Tue Jul 16 2013 Paul Howarth <paul@city-fan.org> - 0.27-1
f960e4
- Update to 0.27
f960e4
  - Handle magic more correctly in add_symbol and get_or_add_symbol
f960e4
- Add upstream patch to avoid build dependency on Package::Stash
f960e4
- BR: perl(Variable::Magic) for the test suite
f960e4
- Update patch for building with old Test::More versions
f960e4
f960e4
* Thu Jan 24 2013 Paul Howarth <paul@city-fan.org> - 0.26-2
f960e4
- BR: perl(Package::Anon) if we have Perl ≥ 5.14
f960e4
f960e4
* Fri Jan  4 2013 Paul Howarth <paul@city-fan.org> - 0.26-1
f960e4
- Update to 0.26
f960e4
  - Internal refactorings to support Package::Anon stashes
f960e4
- BR: perl(base) and perl(Test::Requires) for test suite
f960e4
- Update patch for old distro compatibility
f960e4
- Explicitly run the release/author tests
f960e4
f960e4
* Mon Aug 27 2012 Petr Pisar <ppisar@redhat.com> - 0.25-7
f960e4
- Disable author tests on RHEL >= 7
f960e4
f960e4
* Sat Aug 25 2012 Paul Howarth <paul@city-fan.org> - 0.25-6
f960e4
- Drop EPEL-4 support
f960e4
  - Test::LeakTrace now universally available
f960e4
  - Suitably recent version of ExtUtils::MakeMaker now universally available
f960e4
  - Drop %%defattr, redundant since rpm 4.4
f960e4
- BR: perl(File::Temp)
f960e4
- Don't need to remove empty directories from the buildroot
f960e4
f960e4
* Tue Aug 14 2012 Petr Pisar <ppisar@redhat.com> - 0.25-5
f960e4
- Specify all dependencies
f960e4
f960e4
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25-4
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f960e4
f960e4
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.25-3
f960e4
- Perl 5.16 rebuild
f960e4
f960e4
* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 0.25-2
f960e4
- Use %%{_fixperms} macro instead of our own chmod incantation
f960e4
f960e4
* Tue Sep  6 2011 Paul Howarth <paul@city-fan.org> - 0.25-1
f960e4
- Update to 0.25
f960e4
  - Invalid package names (for instance, Foo:Bar) are not allowed
f960e4
  - Invalid stash entry names (anything containing ::) are not allowed
f960e4
- Update patches to apply cleanly
f960e4
f960e4
* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 0.23-1
f960e4
- Update to 0.23
f960e4
  - Fix the test for scalar values, again
f960e4
  - Disallow assigning globrefs to scalar glob slots (this doesn't actually
f960e4
    make any sense)
f960e4
- Update patches for old ExtUtils::MakeMaker and Test::More versions
f960e4
- perl(Pod::Coverage::TrustPod) now available in EPEL-4 too
f960e4
- Don't use macros for commands
f960e4
f960e4
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.22-2
f960e4
- Perl mass rebuild
f960e4
f960e4
* Sat Mar  5 2011 Paul Howarth <paul@city-fan.org> - 0.22-1
f960e4
- Update to 0.22
f960e4
  - Make the namespace cache lazy and weak, in case the stash is deleted
f960e4
  - However, this doesn't work on 5.8, so disable the namespace caching
f960e4
    entirely there
f960e4
- Update patches to apply cleanly
f960e4
f960e4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
f960e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f960e4
f960e4
* Tue Jan 25 2011 Paul Howarth <paul@city-fan.org> - 0.21-1
f960e4
- Update to 0.21
f960e4
  - Make the leak tests author-only, since some smokers run release tests
f960e4
  - Fix some XS forward compat stuff
f960e4
- Update patches to apply cleanly
f960e4
f960e4
* Wed Jan 12 2011 Paul Howarth <paul@city-fan.org> - 0.20-1
f960e4
- Update to 0.20
f960e4
  - Lower perl prereq to 5.8.1
f960e4
  - Make the leak tests release-only
f960e4
- Update patches to apply cleanly
f960e4
- Drop no-Test::Requires patch, no longer needed
f960e4
- Drop buildreq perl(Test::Requires), no longer needed
f960e4
- Add patch to skip memory leak tests if we don't have Test::LeakTrace
f960e4
f960e4
* Thu Jan  6 2011 Paul Howarth <paul@city-fan.org> - 0.19-1
f960e4
- Update to 0.19 (more correct validity test for scalars)
f960e4
- Update patch for old Test::More versions
f960e4
f960e4
* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-2
f960e4
- Sanitize spec for Fedora submission
f960e4
f960e4
* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-1
f960e4
- Initial RPM build