Use recent gem2rpm style

Use recent bootstrap style
This commit is contained in:
Mamoru TASAKA 2023-12-24 19:33:14 +09:00
parent d84c8fcaa8
commit ef59e08645
1 changed files with 19 additions and 15 deletions

View File

@ -1,12 +1,13 @@
%global gem_name glu %global gem_name glu
%global need_bootstrap 0 %bcond_with bootstrap
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 8.3.0 Version: 8.3.0
Release: 24%{?dist} Release: 25%{?dist}
Summary: Glu bindings for the opengl gem Summary: Glu bindings for the opengl gem
# SPDX confirmed
License: MIT License: MIT
URL: https://github.com/larskanis/glu URL: https://github.com/larskanis/glu
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
@ -17,17 +18,15 @@ BuildRequires: ruby-devel
BuildRequires: libGL-devel BuildRequires: libGL-devel
BuildRequires: libGLU-devel BuildRequires: libGLU-devel
# %%check # %%check
%if 0%{?need_bootstrap} < 1 %if %{without bootstrap}
BuildRequires: rubygem(minitest) >= 5 BuildRequires: rubygem(minitest) >= 5
BuildRequires: rubygem(opengl) BuildRequires: rubygem(opengl)
BuildRequires: %{_bindir}/xvfb-run BuildRequires: %{_bindir}/xvfb-run
BuildRequires: mesa-dri-drivers BuildRequires: mesa-dri-drivers
BuildRequires: rubygem(opengl) >= 0.9 BuildRequires: rubygem(opengl) >= 0.9
BuildRequires: rubygem(glut) BuildRequires: rubygem(glut)
%if 0%{?fedora} >= 36
BuildRequires: rubygem(matrix) BuildRequires: rubygem(matrix)
%endif %endif
%endif
%description %description
Glu bindings for the opengl gem. Glu bindings for the opengl gem.
@ -41,12 +40,11 @@ BuildArch: noarch
Documentation for %{name}. Documentation for %{name}.
%prep %prep
gem unpack %{SOURCE0} %setup -q -n %{gem_name}-%{version}
%setup -q -D -T -n %{gem_name}-%{version} mv ../%{gem_name}-%{version}.gemspec .
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build %build
gem build %{gem_name}.gemspec gem build %{gem_name}-%{version}.gemspec
%gem_install %gem_install
%install %install
@ -57,8 +55,11 @@ cp -a .%{gem_dir}/* \
mkdir -p %{buildroot}%{gem_extdir_mri} mkdir -p %{buildroot}%{gem_extdir_mri}
cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/ cp -a .%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
pushd %{buildroot} pushd %{buildroot}%{gem_extdir_mri}
rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log} rm -f \
gem_make.out \
mkmf.log \
%{nil}
popd popd
@ -69,19 +70,20 @@ rm -rf \
ext/ \ ext/ \
test/ test/
popd popd
rm -f %{buildroot}%{gem_cache}
%check %check
%if 0%{?need_bootstrap} < 1 %if %{without bootstrap}
pushd .%{gem_instdir} pushd .%{gem_instdir}
%ifarch %arm %ifarch %arm
exit 0 exit 0
%endif %endif
export RUBYLIB=$(pwd)/lib:$(pwd):%{buildroot}%{gem_extdir_mri}
xvfb-run \ xvfb-run \
-s "-screen 0 640x480x24" \ -s "-screen 0 640x480x24" \
ruby \ ruby \
-Ilib:.:%{buildroot}%{gem_extdir_mri} \
-e "Dir.glob('test/test_*.rb').each { |f| require f }" -e "Dir.glob('test/test_*.rb').each { |f| require f }"
popd popd
%endif %endif
@ -95,14 +97,16 @@ popd
%{gem_libdir}/ %{gem_libdir}/
%{gem_extdir_mri}/ %{gem_extdir_mri}/
%exclude %{gem_cache}
%{gem_spec} %{gem_spec}
%files doc %files doc
%doc %{gem_docdir} %doc %{gem_docdir}
%changelog %changelog
* Sun Dec 24 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 8.3.0-25
- Use recent gem2rpm style
- Use recent bootstrap style
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.3.0-24 * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.3.0-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild