rubygem-thin/rubygem-thin.spec

84 lines
2.5 KiB
RPMSpec
Raw Normal View History

2020-08-28 15:35:32 +08:00
%global gem_name thin
Name: rubygem-%{gem_name}
2023-01-17 17:23:25 +08:00
Version: 1.8.0
Release: 1
2020-08-28 15:35:32 +08:00
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
2023-01-17 17:23:25 +08:00
# git clone https://github.com/macournoyer/thin.git && cd thin
# git archive -v -o thin-1.8.0-tests.tar.gz v1.8.0 spec/
Source1: %{gem_name}-%{version}-tests.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec)
2020-08-28 15:35:32 +08:00
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
2023-01-17 17:23:25 +08:00
%setup -q -n %{gem_name}-%{version} -b 1
2020-08-28 15:35:32 +08:00
%build
2023-01-17 17:23:25 +08:00
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
2020-08-28 15:35:32 +08:00
%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}
2023-01-17 17:23:25 +08:00
cp -a %{_builddir}/spec spec
# To prevent timeout error on build.
sed -i '/^ def wait_for_server_to_start$/,/^ end$/ s/(10)/(30)/' \
2020-08-28 15:35:32 +08:00
spec/daemonizing_spec.rb
2023-01-17 17:23:25 +08:00
rspec -I$(dirs +1)%{gem_extdir_mri} spec
2020-08-28 15:35:32 +08:00
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
2023-01-17 17:23:25 +08:00
* Tue Jan 17 2023 caodongxia <caodongxia@h-partners.com> - 1.8.0-1
- update to 1.8.0
2021-03-19 14:56:04 +08:00
* Fri Mar 19 2021 maminjie <maminjie1@huawei.com> - 1.7.2-2
- Fix maximum_connections limiting test
2020-08-28 15:35:32 +08:00
* Sat Aug 22 2020 tuShenmei <tushenmei@huawei.com> - 1.7.2-1
- package init