|
|
ad3191 |
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
|
ad3191 |
%{!?scl:%global pkg_name %{name}}
|
|
|
ad3191 |
|
|
|
ad3191 |
# Generated from websocket-extensions-0.1.2.gem by gem2rpm -*- rpm-spec -*-
|
|
|
ad3191 |
%global gem_name websocket-extensions
|
|
|
ad3191 |
|
|
|
ad3191 |
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
|
ad3191 |
Version: 0.1.2
|
|
|
ad3191 |
Release: 2%{?dist}
|
|
|
ad3191 |
Summary: Generic extension manager for WebSocket connections
|
|
|
ad3191 |
Group: Development/Languages
|
|
|
ad3191 |
License: MIT
|
|
|
ad3191 |
URL: http://github.com/faye/websocket-extensions-ruby
|
|
|
ad3191 |
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
ad3191 |
# git clone https://github.com/faye/websocket-extensions-ruby.git && \
|
|
|
ad3191 |
# cd websocket-extensions-ruby
|
|
|
ad3191 |
# git checkout 0.1.2
|
|
|
ad3191 |
# tar -czf rubygem-websocket-extensions-0.1.2-specs.tgz spec/
|
|
|
ad3191 |
Source1: rubygem-websocket-extensions-0.1.2-specs.tgz
|
|
|
ad3191 |
|
|
|
ad3191 |
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
|
ad3191 |
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
ad3191 |
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
|
ad3191 |
BuildRequires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
|
ad3191 |
BuildRequires: %{?scl_prefix_ruby}ruby
|
|
|
ad3191 |
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
|
ad3191 |
BuildRequires: %{?scl_prefix}rubygem(rspec)
|
|
|
ad3191 |
BuildArch: noarch
|
|
|
ad3191 |
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
|
ad3191 |
|
|
|
ad3191 |
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
|
|
|
ad3191 |
%{?scl:Requires: %{?scl_prefix}runtime}
|
|
|
ad3191 |
|
|
|
ad3191 |
%description
|
|
|
ad3191 |
Generic extension manager for WebSocket connections.
|
|
|
ad3191 |
|
|
|
ad3191 |
%package doc
|
|
|
ad3191 |
Summary: Documentation for %{pkg_name}
|
|
|
ad3191 |
Group: Documentation
|
|
|
ad3191 |
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
|
ad3191 |
BuildArch: noarch
|
|
|
ad3191 |
|
|
|
ad3191 |
|
|
|
ad3191 |
%description doc
|
|
|
ad3191 |
Documentation for %{pkg_name}.
|
|
|
ad3191 |
|
|
|
ad3191 |
%prep
|
|
|
ad3191 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
ad3191 |
set -e
|
|
|
ad3191 |
gem unpack %{SOURCE0}
|
|
|
ad3191 |
|
|
|
ad3191 |
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
ad3191 |
|
|
|
ad3191 |
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
|
ad3191 |
%{?scl:EOF}
|
|
|
ad3191 |
|
|
|
ad3191 |
%build
|
|
|
ad3191 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
ad3191 |
set -e
|
|
|
ad3191 |
gem build %{gem_name}.gemspec
|
|
|
ad3191 |
|
|
|
ad3191 |
%gem_install
|
|
|
ad3191 |
%{?scl:EOF}
|
|
|
ad3191 |
|
|
|
ad3191 |
%install
|
|
|
ad3191 |
mkdir -p %{buildroot}%{gem_dir}
|
|
|
ad3191 |
cp -a .%{gem_dir}/* \
|
|
|
ad3191 |
%{buildroot}%{gem_dir}/
|
|
|
ad3191 |
|
|
|
ad3191 |
|
|
|
ad3191 |
|
|
|
ad3191 |
|
|
|
ad3191 |
# Run the test suite
|
|
|
ad3191 |
%check
|
|
|
ad3191 |
pushd .%{gem_instdir}
|
|
|
ad3191 |
tar -xzf %{SOURCE1}
|
|
|
ad3191 |
%{?scl:scl enable %{scl} - << \EOF}
|
|
|
ad3191 |
rspec spec
|
|
|
ad3191 |
%{?scl:EOF}
|
|
|
ad3191 |
popd
|
|
|
ad3191 |
|
|
|
ad3191 |
%files
|
|
|
ad3191 |
%dir %{gem_instdir}
|
|
|
ad3191 |
%exclude %{gem_instdir}/.*
|
|
|
ad3191 |
%{gem_libdir}
|
|
|
ad3191 |
%exclude %{gem_cache}
|
|
|
ad3191 |
%{gem_spec}
|
|
|
ad3191 |
|
|
|
ad3191 |
%files doc
|
|
|
ad3191 |
%doc %{gem_docdir}
|
|
|
ad3191 |
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
ad3191 |
# License text is included in README.md
|
|
|
ad3191 |
# Now asking to upstream to separate the license text.
|
|
|
ad3191 |
# https://github.com/faye/websocket-extensions-ruby/pull/2
|
|
|
ad3191 |
%doc %{gem_instdir}/README.md
|
|
|
ad3191 |
|
|
|
ad3191 |
%changelog
|
|
|
ad3191 |
* Wed Feb 15 2017 Jun Aruga <jaruga@redhat.com> - 0.1.2-2
|
|
|
ad3191 |
- Add "set -e".
|
|
|
ad3191 |
|
|
|
ad3191 |
* Mon Mar 14 2016 Jun Aruga <jaruga@redhat.com> - 0.1.2-1
|
|
|
ad3191 |
- Initial package
|