rubygem-bootsnap/rubygem-bootsnap.spec

99 lines
2.9 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-28 14:18:56 +08:00
%global gem_name bootsnap
Name: rubygem-%{gem_name}
Version: 1.17.0
2023-08-01 19:41:39 +08:00
Release: 1
2020-08-28 14:18:56 +08:00
Summary: Boot large ruby/rails apps faster
License: MIT
URL: https://github.com/Shopify/bootsnap
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
2023-08-01 19:41:39 +08:00
# git clone http://github.com/Shopify/bootsnap.git --no-checkout
# cd bootsnap && git archive -v -o bootsnap-1.17.0-tests.txz v1.17.0 test/
2023-08-01 19:41:39 +08:00
Source1: %{gem_name}-%{version}-tests.txz
# https://github.com/Shopify/bootsnap/issues/431
# https://github.com/Shopify/bootsnap/commit/72202aab5e5b3602ece4e8748bcdeefe2d789ab5
2020-08-28 14:18:56 +08:00
BuildRequires: ruby(release) rubygems-devel ruby-devel >= 2.0.0 rubygem(minitest)
BuildRequires: rubygem(mocha) rubygem(msgpack) gcc
2023-08-01 19:41:39 +08:00
BuildRequires: rubygem(bundler)
2020-08-28 14:18:56 +08:00
ExcludeArch: armv7hl
%description
Bootsnap is a library that plugs into Ruby, with optional support
for ActiveSupport and YAML, to optimize and cache expensive computations.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
2023-08-01 19:41:39 +08:00
%setup -q -n %{gem_name}-%{version} -b 1
2020-08-28 14:18:56 +08:00
sed -i -e "/^\s*\$CFLAGS / s/^/#/g" \
ext/bootsnap/extconf.rb
%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}/%{gem_name}
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
cp -a .%{gem_extdir_mri}/%{gem_name}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name}
rm -rf %{buildroot}%{gem_instdir}/ext/
2023-08-01 19:41:39 +08:00
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/exe -type f | xargs chmod a+x
2020-08-28 14:18:56 +08:00
%check
pushd .%{gem_instdir}
2023-08-01 19:41:39 +08:00
ln -s %{_builddir}/test test
cat <<GEMFILE > Gemfile
gem "minitest"
gem "mocha"
gem "msgpack"
GEMFILE
RUBYOPT="-I$(dirs +1)%{gem_extdir_mri}:$(dirs +1)%{gem_libdir}" \
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
2020-08-28 14:18:56 +08:00
popd
%files
%dir %{gem_instdir}
2023-08-01 19:41:39 +08:00
%{_bindir}/bootsnap
2020-08-28 14:18:56 +08:00
%{gem_extdir_mri}
%license %{gem_instdir}/LICENSE.txt
2023-08-01 19:41:39 +08:00
%{gem_instdir}/exe
2020-08-28 14:18:56 +08:00
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md
%changelog
* Tue Nov 14 2023 xu_ping <707078654@qq.com> - 1.17.0-1
- Update to 1.17.0
2023-08-01 19:41:39 +08:00
* Tue Aug 01 2023 yaoxin <yao_xin001@hoperun.com> - 1.15.0-1
- Update to 1.15.0
* Tue Jul 05 2022 xu_ping <xuping33@h-partners.com> - 1.3.2-4
- fixed mocha/minitest dependency issue due to rubygem-mocha upgrade
2022-06-08 06:52:08 +00:00
* Thu Jan 27 2022 wulei <wulei@huawei.com> - 1.3.2-3
- fix no implicit conversion of String into Integer
2020-09-08 22:59:43 +08:00
* Tue Sep 8 2020 yanan li <liyanan032@huawei.com> - 1.3.2-2
- fix build fail
2020-08-28 14:18:56 +08:00
* Tue Aug 18 2020 wanglin <wanglin175@huawei.com> - 1.3.2-1
- package init