98 lines
2.4 KiB
RPMSpec
98 lines
2.4 KiB
RPMSpec
%global gem_name actioncable
|
|
%global recompile_js 1
|
|
|
|
Name: rubygem-%{gem_name}
|
|
Version: 6.1.4.1
|
|
Release: 1
|
|
Summary: WebSocket framework for Rails
|
|
License: MIT
|
|
URL: http://rubyonrails.org
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
Source1: %{gem_name}-%{version}-tests.txz
|
|
Source2: %{gem_name}-%{version}-app.txz
|
|
Source3: recompile_js.rb
|
|
Source4: rails-%{version}-tools.txz
|
|
|
|
BuildRequires: ruby(release)
|
|
BuildRequires: rubygems-devel > 1.3.1
|
|
BuildRequires: ruby >= 2.2.2
|
|
BuildRequires: rubygem(actionpack) = %{version}
|
|
BuildRequires: rubygem(mocha)
|
|
BuildRequires: rubygem(nio4r)
|
|
BuildRequires: rubygem(puma)
|
|
BuildRequires: %{_bindir}/redis-server
|
|
BuildRequires: rubygem(redis)
|
|
BuildRequires: rubygem(hiredis) >= 0.6.3
|
|
BuildRequires: rubygem(websocket-driver)
|
|
%if 0%{?recompile_js} > 0
|
|
BuildRequires: rubygem(coffee-script)
|
|
BuildRequires: rubygem(sprockets)
|
|
BuildRequires: nodejs
|
|
%endif
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Structure many real-time application concerns into channels over a single
|
|
WebSocket connection.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -a2 -b4
|
|
|
|
%build
|
|
%if 0%{?recompile_js} > 0
|
|
cp -a %{SOURCE3} .
|
|
rm -rf lib/assets/compiled
|
|
RUBYOPT=-Ilib ruby recompile_js.rb
|
|
%endif
|
|
|
|
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
ln -s %{_builddir}/tools ..
|
|
mv %{_builddir}/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
|
|
ruby -rhiredis -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
kill -INT $(cat $REDIS_DIR/redis.pid)
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
%{gem_instdir}/app
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
%changelog
|
|
* Fri May 04 2022 wangkerong <wangkerong@h-partners.com> - 6.1.4.1-1
|
|
- Upgrade to 6.1.4.1
|
|
|
|
* Mon Feb 8 2021 sunguoshuai <sunguoshuai@huawei.com> - 5.2.4.4-1
|
|
- Upgrade to 5.2.4.4
|
|
|
|
* Thu Aug 20 2020 shenleizhao <shenleizhao@huawei.com> - 5.2.3-1
|
|
- package init
|