78 lines
1.9 KiB
RPMSpec
78 lines
1.9 KiB
RPMSpec
%global gem_name zeitwerk
|
|
|
|
Name: rubygem-%{gem_name}
|
|
Version: 2.6.6
|
|
Release: 1
|
|
Summary: Efficient and thread-safe constant autoloader
|
|
License: MIT
|
|
URL: https://github.com/fxn/zeitwerk
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
# cd zeitwerk && git archive -v -o zeitwerk-2.5.4-tests.txz v2.5.4 test
|
|
Source2: %{gem_name}-%{version}-tests.txz
|
|
|
|
BuildRequires: ruby(release)
|
|
BuildRequires: rubygems-devel
|
|
BuildRequires: ruby
|
|
BuildRequires: rubygem(minitest)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Zeitwerk implements constant autoloading with Ruby semantics. Each gem
|
|
and application may have their own independent autoloader, with its own
|
|
configuration, inflector, and logger. Supports autoloading, preloading,
|
|
reloading, and eager loading.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Requires: %{name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{gem_name}-%{version} -b2
|
|
|
|
%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}/test .
|
|
|
|
sed -i '/require..minitest.focus./ s/^/#/' test/test_helper.rb
|
|
sed -i '/require..minitest.reporters./ s/^/#/' test/test_helper.rb
|
|
sed -i '/Minitest::Reporters/ s/^/#/' test/test_helper.rb
|
|
|
|
# https://github.com/fxn/zeitwerk/issues/202
|
|
sed -i '/returns true for a file in a descendant of an ignored directory/ a \
|
|
skip' test/lib/zeitwerk/test_ignore.rb
|
|
|
|
ruby -Itest:lib -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
%changelog
|
|
* Fri Aug 11 2023 zouzhimin <zouzhimin@kylinos.cn> - 2.6.6-1
|
|
- update to 2.6.6-1
|
|
|
|
* Wed Mar 2 2022 caodongxia <caodongxia@huawei.com> - 2.5.4-1
|
|
- Init package
|