Name:		perl-Package-Stash-XS
Version:	0.28
Release:	1%{?_dist_release}
Summary:	Faster and more correct implementation of the Package::Stash API
Group:		Development/Libraries
License:	GPL+ or Artistic
URL:		http://search.cpan.org/dist/Package-Stash-XS/
Source0:	http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-%{version}.tar.gz
Patch0:		Package-Stash-XS-0.23-old-eumm.patch
Patch1:		Package-Stash-XS-0.24-old-Test::More.patch
Patch2:		Package-Stash-XS-0.24-no-Test::LeakTrace.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires:	perl >= 2:5.8.1
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

# Don't "provide" private Perl libs
%{?perl_default_filter}

%description
This is a back-end for Package::Stash, which provides the functionality in a
way that's less buggy and much faster. It will be used by default if it's
installed, and should be preferred in all environments with a compiler.

%prep
%setup -q -n Package-Stash-XS-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}

%check
#make test AUTHOR_TESTING=1 RELEASE_TESTING=1

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes LICENSE README
%{perl_vendorarch}/auto/Package/
%{perl_vendorarch}/Package/
%{_mandir}/man3/Package::Stash::XS.3pm*

%changelog
* Mon Jun 30 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.28-1
- update to 0.28

* Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.25-1
- initial build for Vine Linux

* Thu Jan 12 2012 Paul Howarth <paul@city-fan.org> - 0.25-2
- Use %%{_fixperms} macro instead of our own chmod incantation

* Tue Sep  6 2011 Paul Howarth <paul@city-fan.org> - 0.25-1
- Update to 0.25
  - Invalid package names (for instance, Foo:Bar) are not allowed
  - Invalid stash entry names (anything containing ::) are not allowed
- Update patches to apply cleanly

* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 0.23-1
- Update to 0.23
  - Fix the test for scalar values, again
  - Disallow assigning globrefs to scalar glob slots (this doesn't actually
    make any sense)
- Update patches for old ExtUtils::MakeMaker and Test::More versions
- perl(Pod::Coverage::TrustPod) now available in EPEL-4 too
- Don't use macros for commands

* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 0.22-2
- Perl mass rebuild

* Sat Mar  5 2011 Paul Howarth <paul@city-fan.org> - 0.22-1
- Update to 0.22
  - Make the namespace cache lazy and weak, in case the stash is deleted
  - However, this doesn't work on 5.8, so disable the namespace caching
    entirely there
- Update patches to apply cleanly

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Jan 25 2011 Paul Howarth <paul@city-fan.org> - 0.21-1
- Update to 0.21
  - Make the leak tests author-only, since some smokers run release tests
  - Fix some XS forward compat stuff
- Update patches to apply cleanly

* Wed Jan 12 2011 Paul Howarth <paul@city-fan.org> - 0.20-1
- Update to 0.20
  - Lower perl prereq to 5.8.1
  - Make the leak tests release-only
- Update patches to apply cleanly
- Drop no-Test::Requires patch, no longer needed
- Drop buildreq perl(Test::Requires), no longer needed
- Add patch to skip memory leak tests if we don't have Test::LeakTrace

* Thu Jan  6 2011 Paul Howarth <paul@city-fan.org> - 0.19-1
- Update to 0.19 (more correct validity test for scalars)
- Update patch for old Test::More versions

* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-2
- Sanitize spec for Fedora submission

* Wed Nov 17 2010 Paul Howarth <paul@city-fan.org> - 0.17-1
- Initial RPM build
