rubygem-typhoeus/rubygem-typhoeus.spec

79 lines
2.1 KiB
RPMSpec
Raw Normal View History

2020-08-20 15:28:14 +08:00
%global gem_name typhoeus
Name: rubygem-%{gem_name}
Version: 1.0.2
2022-03-31 10:13:46 +08:00
Release: 2
2020-08-20 15:28:14 +08:00
Summary: Parallel HTTP library on top of libcurl multi
License: MIT
URL: https://github.com/typhoeus/typhoeus
Source0: https://rubygems.org/gems/typhoeus-%{version}.gem
2022-03-31 10:13:46 +08:00
#https://github.com/typhoeus/typhoeus/pull/668
Patch0: typhoeus-1.0.2-Fix-Ruby-3.0-compatibility.patch
2020-08-20 15:28:14 +08:00
BuildRequires: ruby(release) rubygems-devel ruby rubygem(ethon) >= 0.7.0 rubygem(faraday)
2022-03-31 10:13:46 +08:00
BuildRequires: rubygem(rack) rubygem(rspec) rubygem(sinatra) rubygem(webrick)
2020-08-20 15:28:14 +08:00
BuildArch: noarch
%description
Like a modern code version of the mythical beast with 100 serpent heads,
Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
logic.
2020-08-24 15:38:00 +08:00
%package help
2020-08-20 15:28:14 +08:00
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
2020-08-24 15:38:00 +08:00
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
%description help
2020-08-20 15:28:14 +08:00
Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
2022-03-31 10:13:46 +08:00
%patch0 -p1
2020-08-20 15:28:14 +08:00
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
for f in $(find %{buildroot}%{gem_instdir} -name \*.rb)
do
sed -i -e '/^#!/d' $f
chmod 0644 $f
done
%check
pushd .%{gem_instdir}
sed -i -e '/require "bundler"/ s/^/#/' \
-e '/Bundler\.setup/ s/^/#/' spec/spec_helper.rb
rspec spec
popd
%files
%dir %{gem_instdir}
%{gem_libdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%exclude %{gem_cache}
%{gem_spec}
2020-08-24 15:38:00 +08:00
%files help
2020-08-20 15:28:14 +08:00
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/CHANGELOG.md
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Guardfile
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/UPGRADE.md
%{gem_instdir}/perf
%{gem_instdir}/spec
%{gem_instdir}/typhoeus.gemspec
%doc %{gem_docdir}
%changelog
2022-03-31 10:13:46 +08:00
* Thu Feb 24 2022 liyanan <liyanan32@huawei.com> - 1.0.2-2
- Fix Ruby 3.0 compatibility
2020-08-24 15:38:00 +08:00
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 1.0.2-1
- package init