79 lines
2.1 KiB
RPMSpec
79 lines
2.1 KiB
RPMSpec
%global gem_name typhoeus
|
|
Name: rubygem-%{gem_name}
|
|
Version: 1.0.2
|
|
Release: 2
|
|
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
|
|
#https://github.com/typhoeus/typhoeus/pull/668
|
|
Patch0: typhoeus-1.0.2-Fix-Ruby-3.0-compatibility.patch
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(ethon) >= 0.7.0 rubygem(faraday)
|
|
BuildRequires: rubygem(rack) rubygem(rspec) rubygem(sinatra) rubygem(webrick)
|
|
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.
|
|
|
|
%package help
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
Provides: %{name}-doc = %{version}-%{release}
|
|
Obsoletes: %{name}-doc < %{version}-%{release}
|
|
%description help
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -c -T
|
|
%gem_install -n %{SOURCE0}
|
|
%patch0 -p1
|
|
|
|
%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}
|
|
|
|
%files help
|
|
%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
|
|
* Thu Feb 24 2022 liyanan <liyanan32@huawei.com> - 1.0.2-2
|
|
- Fix Ruby 3.0 compatibility
|
|
|
|
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 1.0.2-1
|
|
- package init
|