rubygem-curb/rubygem-curb.spec
baizg1107 e015378f48 update to latest version
(cherry picked from commit 2dc4b8c42403a9d24c5c08339fb8238a489ee6e4)
2022-10-17 10:33:45 +08:00

70 lines
1.8 KiB
RPMSpec

%bcond_with bootstrap
%global gem_name curb
Name: rubygem-%{gem_name}
Version: 1.0.1
Release: 1
Summary: Ruby libcurl bindings
License: Ruby
URL: https://github.com/taf2/curb
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release) rubygems-devel ruby-devel rubygem(test-unit) libcurl-devel gcc
%description
Curb (probably CUrl-RuBy or something) provides Ruby-language bindings for the
libcurl(3), a fully-featured client-side URL transfer library. cURL and
libcurl live at http://curl.haxx.se/.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%autosetup -n %{gem_name}-%{version} -p1
gem unpack %{SOURCE0}
%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/
%if %{with bootstrap}
%check
pushd .%{gem_instdir}
ruby -e 'Dir.glob "./tests/tc_*.rb", &method(:require)'
popd
%endif
%files
%dir %{gem_instdir}
%{gem_extdir_mri}
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.markdown
%{gem_instdir}/Rakefile
%{gem_instdir}/doc.rb
%{gem_instdir}/tests
%changelog
* Tue Jun 28 2022 baizhonggui <baizhonggui@h-partners.com> - 1.0.1-1
- update to 1.0.1
* Sat Sep 5 2020 liyanan <liyanan32@huawei.com> - 0.9.7-2
- fix build fail
* Fri Jul 24 2020 wutao <wutao61@huawei.com> - 0.9.7-1
- package init