!11 [sync] PR-10: 在不同架构下使用同一个 gemsepc 文件

From: @openeuler-sync-bot 
Reviewed-by: @shinwell_hu 
Signed-off-by: @shinwell_hu
This commit is contained in:
openeuler-ci-bot 2024-12-25 10:24:17 +00:00 committed by Gitee
commit 68117e25cc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 51 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,12 @@
%global gem_name ffi
Name: rubygem-%{gem_name}
Version: 1.10.0
Release: 5
Release: 6
Summary: FFI Extensions for Ruby
License: BSD-3-Clause and MIT
URL: https://www.github.com/ffi/ffi
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://www.github.com/ffi/%{gem_name}/archive/%{version}.tar.gz
Source2: ffi-1.10.0-loongarch64.gemspec
Patch0: Remove-taint-support.patch
Patch1: 0001-add-loongarch64-support-for-ffi.patch
Patch2: 0002-Add-types.conf-for-riscv64-linux.patch
@ -31,17 +30,11 @@ Documentation for %{name}.
ln -s %{gem_name}-%{version}/test test
ln -s %{gem_name}-%{version}/spec spec
%patch0 -p1
%ifarch loongarch64
%patch1 -p1
%endif
%patch2 -p1
%build
%ifarch loongarch64
gem build %{SOURCE2}
%else
gem build ../%{gem_name}-%{version}.gemspec
%endif
gem build ffi.gemspec
%gem_install
%install
@ -86,6 +79,9 @@ popd
%{gem_instdir}/ffi.gemspec
%changelog
* Mon Dec 02 2024 Jia Chao <jiac13@chinaunicom.cn> 1.10.0-6
- Fix: always apply loongarch64 patch, use the same gemspec on all arches.
* Mon Jul 10 2023 laokz <zhangkai@iscas.ac.cn> - 1.10.0-5
- backport upstream patch to support riscv64