64 lines
1.7 KiB
RPMSpec
64 lines
1.7 KiB
RPMSpec
%global gem_name fakefs
|
|
|
|
Name: rubygem-%{gem_name}
|
|
Version: 1.2.2
|
|
Release: 1
|
|
Summary: A fake filesystem. Use it in your tests
|
|
License: MIT
|
|
URL: https://github.com/fakefs/fakefs
|
|
Source0: https://rubygems.org/gems/fakefs-%{version}.gem
|
|
Source1: https://github.com/fakefs/fakefs/archive/v%{version}/fakefs-%{version}-tests.tar.gz
|
|
# Skip test of methods introduced in Ruby 2.5.
|
|
# https://github.com/fakefs/fakefs/issues/390
|
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(minitest)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
A fake filesystem. Use it in your tests.
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
%build
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -a .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
ln -s %{_builddir}/{spec,test} .
|
|
rspec spec
|
|
sed -i '/bundler/ s/^/#/' test/test_helper.rb
|
|
sed -i '/maxitest\/autorun/ s/^/#/' test/test_helper.rb
|
|
LC_ALL=C.UTF-8 ruby -Ilib -rminitest/autorun -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%license %{gem_instdir}/LICENSE
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
%changelog
|
|
* Thu Feb 10 2022 zhangtao <zhangtao221@huawei.com> - 1.2.2-1
|
|
- package update to 1.2.2
|
|
* Thu Jul 30 2020 maminjie <maminjie1@huawei.com> - 0.13.1-1
|
|
- package init
|