rubygem-websocket-driver/rubygem-websocket-driver.spec

74 lines
2.3 KiB
RPMSpec
Raw Normal View History

2020-08-20 15:43:29 +08:00
%global gem_name websocket-driver
Name: rubygem-%{gem_name}
2023-11-15 15:09:21 +08:00
Version: 0.7.6
Release: 1
2020-08-20 15:43:29 +08:00
Summary: WebSocket protocol handler with pluggable I/O
License: MIT
URL: http://github.com/faye/websocket-driver-ruby
Source0: https://rubygems.org/gems/websocket-driver-%{version}.gem
2023-11-15 15:09:21 +08:00
Source1: https://github.com/faye/websocket-driver-ruby/archive/refs/tags/%{version}.tar.gz
2020-08-20 15:43:29 +08:00
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(websocket-extensions)
2023-11-15 15:09:21 +08:00
BuildRequires: rubygem(rspec) rubygem(did_you_mean)
2020-08-20 15:43:29 +08:00
%description
This module provides a complete implementation of the WebSocket protocols that
can be hooked up to any TCP library. It aims to simplify things by decoupling
the protocol details from the I/O layer, such that users only need to implement
code to stream data in and out of it without needing to know anything about how
the protocol actually works. Think of it as a complete WebSocket system with
pluggable I/O.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version} -b1
2020-08-20 15:43:29 +08:00
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
gem build %{gem_name}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{gem_extdir_mri}
cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
rm -rf %{buildroot}%{gem_instdir}/ext/
%check
pushd .%{gem_instdir}
tar xf %{SOURCE1}
cd %{gem_name}-ruby-%{version}
sed -i '/bundler/ s/^/#/' spec/spec_helper.rb
rspec -I$(dirs +1)%{gem_extdir_mri} spec
popd
%files
%dir %{gem_instdir}
%{gem_extdir_mri}
%license %{gem_instdir}/LICENSE.md
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md
%changelog
2023-11-15 15:09:21 +08:00
* Wed Nov 15 2023 Ge Wang <wang__ge@126.com> - 0.7.6-1
- Update to version 0.7.6
* Tue Jan 17 2023 wulei <wulei80@h-partners.com> - 0.6.5-2
- Fix handling of default ports on Ruby 3.1
2020-08-20 15:43:29 +08:00
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 0.6.5-1
- Package init