Blob Blame History Raw
Name:           perl-JSON-XS
Epoch:          1
Version:        2.24
Release:        1%{?dist}
Summary:        JSON serialising/deserialising, done correctly and fast
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/JSON-XS/
Source0:        http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/JSON-XS-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# core
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::More)

# don't "provide" private Perl libs
%global _use_internal_dependency_generator 0
%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u
%global __find_provides /bin/sh -c "%{__grep} -v '%_docdir' | %{__grep} -v '%{perl_vendorarch}/.*\\.so$' | %{__deploop P}"
%global __find_requires /bin/sh -c "%{__grep} -v '%_docdir' | %{__deploop R}"

%description
This module converts Perl data structures to JSON and vice versa. Its
primary goal is to be correct and its secondary goal is to be fast. To
reach the latter goal it was written in C.

%prep
%setup -q -n JSON-XS-%{version}

sed -i 's/\r//' t/*
perl -pi -e 's|^#! ?perl|#!/usr/bin/perl|' t/*
perl -pi -e 's|^#!/opt/bin/perl|#!/usr/bin/perl|' eg/*
chmod -c -x eg/*

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

%install
rm -rf %{buildroot}

make pure_install PERL_INSTALL_ROOT=%{buildroot}

find %{buildroot} -type f -name .packlist -exec rm -f {} +
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} +
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} %{buildroot}/*

%check
make test

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes COPYING README t/ eg/
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto
%{_bindir}/*
%{_mandir}/man[13]/*

%changelog
* Tue Jun 02 2009 Chris Weyl <cweyl@alumni.drew.edu> 2.24-1
- auto-update to 2.24 (by cpan-spec-update 0.01)

* Thu Mar 26 2009 Chris Weyl <cweyl@alumni.drew.edu> - 2.2311-4
- Stripping bad provides of private Perl extension libs

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2311-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2311-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Feb 22 2009 Chris Weyl <cweyl@alumni.drew.edu> 2.2311-1
- update to 2.2311

* Sun Sep 07 2008 Chris Weyl <cweyl@alumni.drew.edu> 2.2222-1
- update to the increasingly silly version of 2.2222
- update files to include bin

* Wed Jun 25 2008 Chris Weyl <cweyl@alumni.drew.edu> 2.21-1
- update to 2.21

* Wed May 28 2008 Chris Weyl <cweyl@alumni.drew.edu> 2.2-1
- update to 2.2

* Sun Mar 09 2008 Chris Weyl <cweyl@alumni.drew.edu> 2.01-1
- update to 2.x series before F9

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.52-3
Rebuild for new perl

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.52-2
- Autorebuild for GCC 4.3

* Wed Oct 17 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.52-1
- update to 1.52
- license tag update: GPL -> GPL+

* Tue Aug 21 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.43-2
- bump

* Thu Aug 09 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.43-1
- update to 1.43

* Fri Jun 01 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.22-1
- update to 1.22

* Mon May 14 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.21-3
- bump

* Mon May 14 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.21-2
- add eg/ to doc

* Sun May 13 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.21-1
- Specfile autogenerated by cpanspec 1.71.