Blob Blame History Raw
Name:           perl-JSON-RPC-Common
Version:        0.03
Release:        3%{?dist}
Summary:        Perl module for handling JSON-RPC objects
Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/JSON-RPC-Common
Source0:        http://www.cpan.org/authors/id/N/NU/NUFFIN/JSON-RPC-Common-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  perl(JSON)
BuildRequires:  perl(MooseX::Types)
BuildRequires:  perl(Test::Exception)
BuildRequires:  perl(Test::use::ok)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
This module provides abstractions for JSON-RPC 1.0, 1.1 (both variations) and
2.0 (formerly 1.2) Procedure Call and Procedure Return objects (formerly known
as request and result), along with error objects.
It also provides marshalling objects to convert the model objects into JSON
text and HTTP requests/responses.

%prep
%setup -q -n JSON-RPC-Common-%{version}

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

%install
rm -rf $RPM_BUILD_ROOT
make install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
chmod -R u+w $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc Changes
%{perl_vendorlib}/JSON/RPC/
%{_mandir}/man3/*.3pm*

%changelog
* Fri May 01 2009 Christian Krause <chkr@fedoraproject.org> - 0.03-3
- fixed rpmlint warnings

* Thu Apr 30 2009 Christian Krause <chkr@fedoraproject.org> - 0.03-2
- fixed description
- added Changes file as %%doc
- removed unneeded build requirements
- package owns now %%{perl_vendorlib}/JSON/RPC/

* Wed Apr 29 2009 Christian Krause <chkr@fedoraproject.org> - 0.03-1
- Initial spec file for JSON-RPC-Common