62 lines
1.5 KiB
RPMSpec
62 lines
1.5 KiB
RPMSpec
|
|
%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
|
||
|
|
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
|