Name: perl-Protocol-WebSocket
Version: 0.18
Release: 1%{?dist}
Summary: WebSocket protocol
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Protocol-WebSocket/
Source0: http://www.cpan.org/modules/by-module/Protocol/Protocol-WebSocket-%{version}.tar.gz
# includes Test::More with a higher version than available for epel6
Patch1: test_simple_include.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(constant)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(Digest::SHA)
BuildRequires: perl(Encode)
%if 0%{?el6}
BuildRequires: perl(Exporter)
%endif
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(strict)
BuildRequires: perl(Test::More)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
%if 0%{?el6}
BuildRequires: perl(vars)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Client/server WebSocket message and frame parser/constructor. This module
does not provide a WebSocket server or client, but is made for using in
http servers or clients to provide WebSocket support.
%prep
%setup -q -n Protocol-WebSocket-%{version}
%{__sed} -i 's|\r||' ./examples/reflex.pl
%if 0%{?el6}
%patch1 -p1
%patch2 -p1
%endif
# Upstream is okay with wsconsole being made available as a binary for Fedora/EPEL
%{__mv} util bin
%build
%{__perl} Build.PL installdirs=vendor
./Build
%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
%{_fixperms} $RPM_BUILD_ROOT/*
%check
%if 0%{?el6}
PERL5LIB=test_simple_patch/lib ./Build test
%else
./Build test
%endif
%files
%doc Changes LICENSE examples
%{perl_vendorlib}/*
%{_mandir}/man3/*
%{_bindir}/*
%changelog
* Wed Sep 03 2014 David Dick <ddick@cpan.org> - 0.18-1
- depend on Digest::SHA instead of Digest::SHA1
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.17-3
- Perl 5.20 rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Apr 12 2014 David Dick <ddick@cpan.org> - 0.17-1
- Initial release