rubygem-method_source/rubygem-method_source.spec

64 lines
1.6 KiB
RPMSpec
Raw Normal View History

2020-08-28 16:32:39 +08:00
%global gem_name method_source
Summary: Retrieve the source code for a method
Name: rubygem-%{gem_name}
Version: 0.8.2
Release: 1
License: MIT
URL: https://banisterfiend.wordpress.com
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
2020-08-28 17:34:27 +08:00
# Fix Fixnum/Bignum deprecated warning for Ruby 2.4.0.
# https://github.com/banister/method_source/commit/05ce7fc
2020-08-28 16:32:39 +08:00
Patch0: rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings.patch
Patch1: rubygem-method_source-0.8.2-fix-fixnum-bignum-warnings-tests.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem-bacon
BuildArch: noarch
%description
Retrieve the source code for a method
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
%patch0 -p1
popd
%build
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
cat %{PATCH1} | patch -p1
bacon test/test.rb
popd
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.markdown
%{gem_instdir}/Rakefile
%{gem_instdir}/method_source.gemspec
%{gem_instdir}/test
%changelog
* Wed Aug 19 2020 geyanan <geyanan2@huawei.com> - 0.8.2-1
- package init