rubygem-actioncable/rubygem-actioncable.spec

97 lines
2.3 KiB
RPMSpec
Raw Normal View History

2021-06-07 15:57:07 +08:00
%global pkg_name %{name}
2020-08-28 14:14:59 +08:00
%global gem_name actioncable
2021-06-07 15:57:07 +08:00
%global gem_require_name %{gem_name}
Name: rubygem-%{gem_name}
Version: 6.0.3.4
Release: 1
Summary: WebSocket framework for Rails
Group: Development/Languages
License: MIT
URL: https://rubyonrails.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/rails/rails/archive/refs/tags/v%{version}.tar.gz
Requires: ruby(release)
Requires: ruby >= 2.5.0
Requires: ruby(rubygems)
Requires: rubygem(actionpack) = 6.0.3.4
Requires: rubygem(nio4r) >= 2.0
Requires: rubygem(nio4r) < 3
Requires: rubygem(websocket-driver) >= 0.6.1
BuildRequires: ruby(release)
BuildRequires: ruby >= 2.5.0
BuildRequires: rubygems-devel
BuildRequires: %{_bindir}/redis-server rubygem(redis)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
Obsoletes: tfm-ror52-rubygem-%{gem_name} <= 5.2.1
2020-08-28 14:14:59 +08:00
%description
Structure many real-time application concerns into channels over a single
WebSocket connection.
%package doc
2021-06-07 15:57:07 +08:00
Summary: Documentation for %{pkg_name}
Group: Documentation
Requires: %{pkg_name} = %{version}-%{release}
BuildArch: noarch
2020-08-28 14:14:59 +08:00
%description doc
2021-06-07 15:57:07 +08:00
Documentation for %{pkg_name}.
2020-08-28 14:14:59 +08:00
%prep
gem unpack %{SOURCE0}
2021-06-07 15:57:07 +08:00
%setup -q -D -T -n %{gem_name}-%{version}
2020-08-28 14:14:59 +08:00
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
gem build %{gem_name}.gemspec
2021-06-07 15:57:07 +08:00
2020-08-28 14:14:59 +08:00
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
tar xzvf %{SOURCE1}
ln -s rails-%{version}/%{gem_name}/test test
mv test/client_test.rb{,.disable}
mv test/subscription_adapter/postgresql_test.rb{,.disable}
REDIS_DIR=$(mktemp -d)
redis-server --dir $REDIS_DIR --pidfile $REDIS_DIR/redis.pid --daemonize yes
2021-06-07 15:57:07 +08:00
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb"'
kill -INT $(cat $REDIS_DIR/redis.pid) || echo end
2020-08-28 14:14:59 +08:00
popd
%files
%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE
2021-06-07 15:57:07 +08:00
%{gem_instdir}/app
2020-08-28 14:14:59 +08:00
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md
%changelog
2021-06-07 15:57:07 +08:00
* Mon Jun 07 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 6.0.3.4-1
- Update to 6.0.3.4
* Mon Feb 8 2021 sunguoshuai <sunguoshuai@huawei.com> - 5.2.4.4-1
- Upgrade to 5.2.4.4
2020-08-28 14:14:59 +08:00
* Thu Aug 20 2020 shenleizhao <shenleizhao@huawei.com> - 5.2.3-1
- package init