33d3a5
# We need to patch the test suite if we have an old version of Test::More
33d3a5
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
33d3a5
33d3a5
# TODO: BR: perl(Package::Anon) for test suite when available
33d3a5
33d3a5
Name:		perl-Package-Stash
33d3a5
Version:	0.34
e3454f
Release:	2%{?dist}
33d3a5
Summary:	Routines for manipulating stashes
33d3a5
Group:		Development/Libraries
33d3a5
License:	GPL+ or Artistic
33d3a5
URL:		http://search.cpan.org/dist/Package-Stash/
33d3a5
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-%{version}.tar.gz
33d3a5
Patch1:		Package-Stash-0.34-old-Test::More.patch
33d3a5
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
33d3a5
BuildArch:	noarch
33d3a5
BuildRequires:	perl(base)
33d3a5
BuildRequires:	perl(Carp)
33d3a5
BuildRequires:	perl(constant)
33d3a5
BuildRequires:	perl(Dist::CheckConflicts) >= 0.02
33d3a5
BuildRequires:	perl(ExtUtils::MakeMaker)
33d3a5
BuildRequires:	perl(File::Spec)
33d3a5
BuildRequires:	perl(File::Temp)
33d3a5
BuildRequires:	perl(lib)
33d3a5
BuildRequires:	perl(Module::Implementation) >= 0.06
33d3a5
BuildRequires:	perl(Package::DeprecationManager)
33d3a5
BuildRequires:	perl(Package::Stash::XS) >= 0.26
33d3a5
BuildRequires:	perl(Scalar::Util)
33d3a5
BuildRequires:	perl(Test::Fatal)
33d3a5
BuildRequires:	perl(Test::More)
33d3a5
BuildRequires:	perl(Test::Requires)
33d3a5
# Optional tests:
33d3a5
%if ! (0%{?rhel} >= 7)
33d3a5
BuildRequires:	perl(Pod::Coverage::TrustPod)
33d3a5
BuildRequires:	perl(Test::EOL)
33d3a5
BuildRequires:	perl(Test::LeakTrace)
33d3a5
BuildRequires:	perl(Test::NoTabs)
33d3a5
BuildRequires:	perl(Test::Pod)
33d3a5
BuildRequires:	perl(Test::Pod::Coverage)
33d3a5
%endif
33d3a5
BuildRequires:	perl(Test::Script)
33d3a5
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
33d3a5
# For performance and consistency
33d3a5
Requires:	perl(Package::Stash::XS) >= 0.26
33d3a5
# Not found by rpm auto-provides
33d3a5
Provides:	perl(Package::Stash::Conflicts) = 0
33d3a5
33d3a5
%description
33d3a5
Manipulating stashes (Perl's symbol tables) is occasionally necessary, but
33d3a5
incredibly messy, and easy to get wrong. This module hides all of that behind
33d3a5
a simple API.
33d3a5
33d3a5
%prep
33d3a5
%setup -q -n Package-Stash-%{version}
33d3a5
33d3a5
# Compatibility with old Test::More versions
33d3a5
%if %{old_test_more}
33d3a5
%patch1 -p1
33d3a5
%endif
33d3a5
33d3a5
%build
33d3a5
perl Makefile.PL INSTALLDIRS=vendor
33d3a5
make %{?_smp_mflags}
33d3a5
33d3a5
%install
33d3a5
rm -rf %{buildroot}
33d3a5
make pure_install DESTDIR=%{buildroot}
33d3a5
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
33d3a5
%{_fixperms} %{buildroot}
33d3a5
33d3a5
%check
33d3a5
make test
33d3a5
%if ! (0%{?rhel} >= 7)
33d3a5
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
33d3a5
%endif
33d3a5
33d3a5
%clean
33d3a5
rm -rf %{buildroot}
33d3a5
33d3a5
%files
33d3a5
%doc Changes LICENSE README
33d3a5
%{_bindir}/package-stash-conflicts
33d3a5
%{perl_vendorlib}/Package/
33d3a5
%{_mandir}/man3/Package::Stash.3pm*
33d3a5
%{_mandir}/man3/Package::Stash::PP.3pm*
33d3a5
33d3a5
%changelog
e3454f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.34-2
e3454f
- Mass rebuild 2013-12-27
e3454f
33d3a5
* Sun Jan  6 2013 Paul Howarth <paul@city-fan.org> - 0.34-1
33d3a5
- Update to 0.34
33d3a5
  - Support anonymous stashes on newer perl versions
33d3a5
  - Prevent harmful effects from invalid settings for
33d3a5
    $ENV{PACKAGE_STASH_IMPLEMENTATION}
33d3a5
  - Switch to Module::Implementation
33d3a5
- BR: perl(Module::Implementation) ≥ 0.06
33d3a5
- BR: perl(base) for test suite
33d3a5
- Bump Package::Stash::XS version requirement to 0.26
33d3a5
- Explicitly run extra tests (except on RHEL ≥ 7, where the necessary
33d3a5
  build dependencies may not be available)
33d3a5
- Update patch for building with old Test::More version in EPEL-5
33d3a5
33d3a5
* Mon Aug 27 2012 Petr Pisar <ppisar@redhat.com> - 0.33-7
33d3a5
- Disable author tests on RHEL >= 7
33d3a5
33d3a5
* Fri Aug 24 2012 Paul Howarth <paul@city-fan.org> - 0.33-6
33d3a5
- Drop EPEL-4 support
33d3a5
  - Drop %%defattr, redundant since rpm 4.4
33d3a5
  - Test::LeakTrace, Test::Requires and Test::Script are now universally available
33d3a5
  - A suitably recent version of ExtUtils::MakeMaker is now universally available
33d3a5
- Don't need to remove empty directories from the buildroot
33d3a5
33d3a5
* Tue Aug 14 2012 Petr Pisar <ppisar@redhat.com> - 0.33-5
33d3a5
- Specify all dependendencies
33d3a5
33d3a5
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-4
33d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
33d3a5
33d3a5
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.33-3
33d3a5
- Perl 5.16 rebuild
33d3a5
33d3a5
* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 0.33-2
33d3a5
- Fedora 17 mass rebuild
33d3a5
33d3a5
* Thu Sep 29 2011 Paul Howarth <paul@city-fan.org> - 0.33-1
33d3a5
- Update to 0.33
33d3a5
  - Add conflict on MooseX::Method::Signatures 0.36
33d3a5
- BR: perl(Carp)
33d3a5
33d3a5
* Tue Sep  6 2011 Paul Howarth <paul@city-fan.org> - 0.32-1
33d3a5
- Update to 0.32
33d3a5
  - Bring the behavior of has_symbol for nonexistant scalars into line with the
33d3a5
    XS version
33d3a5
  - Invalid package names (for instance, Foo:Bar) are not allowed
33d3a5
  - Invalid stash entry names (anything containing ::) are not allowed
33d3a5
- Update patches to apply cleanly
33d3a5
- Bump perl(Package::Stash::XS) version requirement to 0.24
33d3a5
33d3a5
* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 0.31-1
33d3a5
- Update to 0.31
33d3a5
  - Fix ->add_symbol('$foo', qr/sdlfk/) on 5.12+
33d3a5
  - Fix ->add_symbol('$foo', \v1.2.3) on 5.10+
33d3a5
- Update patch for old Test::More versions
33d3a5
- Update patch for no Test::Requires
33d3a5
33d3a5
* Thu Jul 21 2011 Paul Howarth <paul@city-fan.org> - 0.30-2
33d3a5
- Perl mass rebuild
33d3a5
33d3a5
* Thu Jul 21 2011 Paul Howarth <paul@city-fan.org> - 0.30-1
33d3a5
- Update to 0.30
33d3a5
  - Fix compiler detection in Makefile.PL
33d3a5
- Update patch for old ExtUtils::MakeMaker versions
33d3a5
- Drop usage of macros for commands
33d3a5
- Drop redundant %%{?perl_default_filter}
33d3a5
- perl(Pod::Coverage::TrustPod) now available everywhere
33d3a5
33d3a5
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.29-2
33d3a5
- Perl mass rebuild
33d3a5
33d3a5
* Wed Apr  6 2011 Paul Howarth <paul@city-fan.org> - 0.29-1
33d3a5
- Update to 0.29
33d3a5
  - Really skip the package-stash-conflict script in the compile test
33d3a5
33d3a5
* Wed Mar 30 2011 Paul Howarth <paul@city-fan.org> - 0.28-1
33d3a5
- Update to 0.28
33d3a5
  - META.json fixes
33d3a5
- Update patch for old ExtUtils::MakeMaker versions to apply cleanly
33d3a5
33d3a5
* Mon Mar 28 2011 Paul Howarth <paul@city-fan.org> - 0.27-1
33d3a5
- Update to 0.27
33d3a5
  - Skip the package-stash-conflicts script in the compile test
33d3a5
33d3a5
* Sat Mar  5 2011 Paul Howarth <paul@city-fan.org> - 0.26-1
33d3a5
- Update to 0.26
33d3a5
  - Make the namespace cache lazy and weak, in case the stash is deleted
33d3a5
  - However, this doesn't work on 5.8, so disable the namespace caching
33d3a5
    entirely there
33d3a5
- Update patches to apply cleanly
33d3a5
- Bump perl(Package::Stash::XS) version requirement to 0.22
33d3a5
- Bump perl(Dist::CheckConflicts) version requirement to 0.02
33d3a5
33d3a5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25-2
33d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
33d3a5
33d3a5
* Tue Jan 25 2011 Paul Howarth <paul@city-fan.org> - 0.25-1
33d3a5
- Update to 0.25 (make the leak tests author-only, since some smokers run
33d3a5
  release tests)
33d3a5
- Update patches to apply cleanly
33d3a5
- Bump perl(Package::Stash::XS) version requirement to 0.21
33d3a5
- Drop buildreq perl(Test::Exception), no longer needed
33d3a5
33d3a5
* Tue Jan 18 2011 Paul Howarth <paul@city-fan.org> - 0.24-1
33d3a5
- Update to 0.24 (reinstate Test::Requires dependency)
33d3a5
33d3a5
* Wed Jan 12 2011 Paul Howarth <paul@city-fan.org> - 0.23-1
33d3a5
- Update to 0.23
33d3a5
  - Lower perl prereq to 5.8.1
33d3a5
  - Make the leak tests release-only
33d3a5
- Update patches to apply cleanly
33d3a5
- Add patch to skip memory leak tests if we don't have Test::LeakTrace
33d3a5
33d3a5
* Thu Jan  6 2011 Paul Howarth <paul@city-fan.org> - 0.22-1
33d3a5
- Update to 0.22 (bump Package::Stash::XS version requirement since a bug was
33d3a5
  fixed there)
33d3a5
- Update patches for old ExtUtils::MakeMaker and Test::More versions
33d3a5
- BR/R perl(Package::Stash::XS) >= 0.19
33d3a5
- Content-free manpages for package-stash-conflicts and
33d3a5
  Package::Stash::Conflicts dropped upstream
33d3a5
33d3a5
* Tue Jan  4 2011 Paul Howarth <paul@city-fan.org> - 0.20-1
33d3a5
- Update to 0.20
33d3a5
  - Methods were renamed for brevity: s/_package//
33d3a5
  - Convert Package::Stash into a module which loads either the XS or pure perl
33d3a5
    implementation, depending on what's available
33d3a5
  - Use Test::Fatal instead of Test::Exception
33d3a5
  - Use Dist::CheckConflicts
33d3a5
  - Silence deprecation warnings for the method renaming for now
33d3a5
- New script and manpage: package-stash-conflicts
33d3a5
- New modules and manpages: Package::Stash::Conflicts and Package::Stash::PP
33d3a5
- New build requirements:
33d3a5
  - perl(Dist::CheckConflicts)
33d3a5
  - perl(Package::DeprecationManager)
33d3a5
  - perl(Package::Stash::XS)
33d3a5
  - perl(Test::LeakTrace)
33d3a5
  - perl(Test::Requires)
33d3a5
  - perl(Test::Script)
33d3a5
- Update patches for old ExtUtils::MakeMaker and Test::More versions
33d3a5
- Add new patch to work around absence of Test::Requires in EPEL-4
33d3a5
- Require perl(Package::Stash::XS) for performance and consistency
33d3a5
- Manually provide perl(Package::Stash::Conflicts), hidden from auto-provides
33d3a5
33d3a5
* Tue Dec 21 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.08-2
33d3a5
- Rebuild to fix problems with vendorarch/lib (#661697)
33d3a5
33d3a5
* Mon Sep 20 2010 Paul Howarth <paul@city-fan.org> - 0.08-1
33d3a5
- Update to 0.08 (re-enable the caching of the stash)
33d3a5
- Update patch for old ExtUtils::MakeMaker and Test::More versions
33d3a5
33d3a5
* Wed Jun 16 2010 Paul Howarth <paul@city-fan.org> - 0.05-1
33d3a5
- Update to 0.05
33d3a5
  - Bump Test::More requirement for done_testing
33d3a5
  - Update packaging stuff
33d3a5
- BR: perl(Test::EOL) and perl(Test::NoTabs)
33d3a5
- Unify spec for all active branches, adding patches for back-compatibility
33d3a5
33d3a5
* Mon Jun 14 2010 Paul Howarth <paul@city-fan.org> - 0.04-1
33d3a5
- Update to 0.04 (get_package_symbol now doesn't autovivify stash entries; a
33d3a5
  new method get_or_add_package_symbol can now be used for that behavior)
33d3a5
33d3a5
* Mon Jun 14 2010 Paul Howarth <paul@city-fan.org> - 0.03-2
33d3a5
- Incorporate package review suggestions (#602597)
33d3a5
  - Use %%{?perl_default_filter}
33d3a5
  - Use DESTDIR instead of PERL_INSTALL_ROOT
33d3a5
33d3a5
* Mon Jun  7 2010 Paul Howarth <paul@city-fan.org> - 0.03-1
33d3a5
- Initial RPM version