rubygem-thin/rubygem-thin.spec
zouzhimin f315a3aa0f update to 1.8.2
(cherry picked from commit d94fc8ca404dcf5e9c8b35c9d86c0e999f735753)
2023-08-14 14:29:36 +08:00

88 lines
2.5 KiB
RPMSpec

%global gem_name thin
Name: rubygem-%{gem_name}
Version: 1.8.2
Release: 1
Summary: A thin and fast web server
License: (GPLv2+ or Ruby) and BSD and MIT
URL: https://rubygems.org/gems/%{gem_name}/versions/%{version}
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/macournoyer/thin.git && cd thin
# git archive -v -o thin-1.8.2-tests.tar.gz v1.8.2 spec/
Source1: %{gem_name}-%{version}-tests.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec)
BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0
%description
Thin is a Ruby web server that glues together three of the best Ruby
libraries in web history.
The Mongrel parser, the root of Mongrel speed and security,
Event Machine, a network I/O library with extremely high scalability and
Rack, a minimal interface between webservers and Ruby frameworks.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
%build
gem build ../%{gem_name}-%{version}.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/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
cp -a %{_builddir}/spec spec
# To prevent timeout error on build.
sed -i '/^ def wait_for_server_to_start$/,/^ end$/ s/(10)/(30)/' \
spec/daemonizing_spec.rb
rspec -I$(dirs +1)%{gem_extdir_mri} spec
popd
%files
%dir %{gem_instdir}
%{_bindir}/thin
%{gem_extdir_mri}
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%{gem_instdir}/example/
%doc %{gem_instdir}/CHANGELOG
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%changelog
* Mon Aug 14 2023 zouzhimin <zouzhimin@kylinos.cn> - 1.8.2-1
- update to 1.8.2
* Tue Jan 17 2023 caodongxia <caodongxia@h-partners.com> - 1.8.0-1
- update to 1.8.0
* Fri Mar 19 2021 maminjie <maminjie1@huawei.com> - 1.7.2-2
- Fix maximum_connections limiting test
* Sat Aug 22 2020 tuShenmei <tushenmei@huawei.com> - 1.7.2-1
- package init