8
0
forked from pool/perl-JSON-RPC

cpanspec, fix deps, noarch pkg

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-JSON-RPC?expand=0&rev=3
This commit is contained in:
Christian Wittmer
2010-11-11 15:11:11 +00:00
committed by Git OBS Bridge
parent 5fff41af0c
commit b6584d959f
2 changed files with 69 additions and 24 deletions

View File

@@ -1,5 +1,7 @@
#
# spec file for package perl-JSON-RPC
# spec file for package perl-JSON-RPC (Version 0.96)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -10,53 +12,89 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%bcond_with pod
Name: perl-JSON-RPC
%define cpan_name JSON-RPC
Summary: Perl implementation of JSON-RPC 1.1 protocol
%define _real_name JSON-RPC
Version: 0.96
Release: 1
License: Artistic License
BuildRequires: perl-JSON perl-libwww-perl
Requires: perl-JSON perl-libwww-perl
Release: 2
License: GPL+ or Artistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/perldoc?JSON::RPC
Source: %{_real_name}-%{version}.tar.bz2
Url: http://search.cpan.org/dist/JSON-RPC/
#Source: http://www.cpan.org/modules/by-module/JSON/JSON-RPC-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.bz2
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
%if 0%{?suse_version} < 1120
BuildRequires: perl-macros
%endif
%if %{with pod}
BuildRequires: perl(Test::Pod) >= 1.00
%endif
BuildRequires: perl(Test::More)
BuildRequires: perl(CGI) >= 2.92
BuildRequires: perl(JSON) >= 2
BuildRequires: perl(LWP::UserAgent) >= 2.001
## coming with LWP::UserAgent
#BuildRequires: perl(HTTP::Request)
#BuildRequires: perl(HTTP::Response)
#
Requires: perl = %{perl_version}
Requires: perl(CGI) >= 2.92
Requires: perl(JSON) >= 2
Requires: perl(LWP::UserAgent) >= 2.001
## coming with LWP::UserAgent
#Requires: perl(HTTP::Request)
#Requires: perl(HTTP::Response)
%description
JSON-RPC is a stateless and light-weight remote procedure call (RPC)
protocol for inter-networking applications over HTTP. It uses JSON
as the data format for of all facets of a remote procedure call,
including all application data carried in parameters.
protocol for inter-networking applications over HTTP. It uses JSON as the
data format for of all facets of a remote procedure call, including all
application data carried in parameters.
The old modules - JSONRPC::Transport::HTTP and Apache::JSONRPC are deprecated.
Please try to use JSON::RPC::Server and JSON::RPC::Client which support both
JSON-RPC protocol version 1.1 and 1.0.
Authors:
--------
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
%prep
%setup -n %{_real_name}-%{version}
%setup -q -n %{cpan_name}-%{version}
### rpmlint:
# wrong-file-end-of-line-encoding
%{__perl} -pi -e 's|\r\n|\n|' ex/jsonrpc.conf
%build
%{__perl} Makefile.PL INSTALLDIRS="vendor" destdir="%{buildroot}"
%{__make} %{?jobs:-j%jobs}
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%{makeinstall}
%{__rm} -rf %{buildroot}%{perl_archlib}/perllocal.pod
find %{buildroot} -name .packlist -exec %{__rm} {} \;
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, 0755)
%{_mandir}/man3/*.gz
%dir %{perl_vendorlib}/JSON/
%{perl_vendorlib}/JSON/*
%{perl_vendorlib}/*.pm
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes ex README
%changelog