73 lines
2.0 KiB
RPMSpec
73 lines
2.0 KiB
RPMSpec
|
|
%global gem_name addressable
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 2.5.2
|
||
|
|
Release: 1
|
||
|
|
Summary: URI Implementation
|
||
|
|
License: ASL 2.0
|
||
|
|
URL: https://github.com/sporkmonger/addressable
|
||
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||
|
|
BuildRequires: ruby(release) rubygems-devel rubygem(bigdecimal) rubygem(public_suffix)
|
||
|
|
BuildRequires: rubygem(rspec-its) rubygem(idn)
|
||
|
|
BuildArch: noarch
|
||
|
|
# Revert f1d5855162c48d06eb1907871909d5859b9a7d3c (rack-mount)
|
||
|
|
Patch0: no-rack-mount.patch
|
||
|
|
# Comment out failing tests
|
||
|
|
Patch1: fix_addressable_tests.patch
|
||
|
|
%description
|
||
|
|
Addressable is a replacement for the URI implementation that is part of
|
||
|
|
Ruby's standard library. It more closely conforms to the relevant RFCs and
|
||
|
|
adds support for URI and URL templates.
|
||
|
|
|
||
|
|
%package doc
|
||
|
|
Summary: Documentation for %{name}
|
||
|
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
BuildArch: noarch
|
||
|
|
%description doc
|
||
|
|
Documentation for %{name}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
gem unpack %{SOURCE0}
|
||
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||
|
|
%patch0
|
||
|
|
%patch1
|
||
|
|
|
||
|
|
%build
|
||
|
|
gem build %{gem_name}.gemspec
|
||
|
|
%gem_install
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -a .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
rm spec/addressable/rack_mount_compat_spec.rb
|
||
|
|
sed -i "/require 'bundler\/setup'/ s/^/#/" spec/spec_helper.rb
|
||
|
|
sed -i '/^begin$/,/^end$/ s/^/#/' spec/spec_helper.rb
|
||
|
|
rm spec/addressable/net_http_compat_spec.rb
|
||
|
|
rspec spec/
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%license %{gem_instdir}/LICENSE.txt
|
||
|
|
%{gem_instdir}/data
|
||
|
|
%{gem_libdir}
|
||
|
|
%{gem_instdir}/tasks
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
||
|
|
%{gem_instdir}/Gemfile
|
||
|
|
%doc %{gem_instdir}/README.md
|
||
|
|
%{gem_instdir}/Rakefile
|
||
|
|
%{gem_instdir}/spec
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Aug 18 2020 shenleizhao <shenleizhao@huawei.com> - 2.5.2-1
|
||
|
|
- package init
|