Blob Blame History Raw
Name:           perl-JSON-XS
Version:        1.21
Release:        2%{?dist}
Summary:        JSON serialising/deserialising, done correctly and fast
License:        GPL or Artistic 
Group:          Development/Libraries
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)

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.

%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/*

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

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}/*

make test

rm -rf %{buildroot}

%doc Changes COPYING README t/ eg/

* Mon May 14 2007 Chris Weyl <> 1.21-2
- add eg/ to doc

* Sun May 13 2007 Chris Weyl <> 1.21-1
- Specfile autogenerated by cpanspec 1.71.