-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../.git/annex/objects/2Q/MX/SHA256E-s100864--496f40ad44bcbf99de02da1f26b1ad64e6593cd487b931508a86228e2a3af0fa.0.gem/SHA256E-s100864--496f40ad44bcbf99de02da1f26b1ad64e6593cd487b931508a86228e2a3af0fa.0.gem |
93 changes: 93 additions & 0 deletions
93
packages/plugins/rubygem-llhttp-ffi/rubygem-llhttp-ffi.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# template: default | ||
# | ||
# PLEASE UPDATE WITH CARE! | ||
# The directory structure is very special and | ||
# does not really align with any other package | ||
# | ||
%global gem_name llhttp-ffi | ||
%global gem_require_name llhttp | ||
%global debug_package %{nil} | ||
|
||
Name: rubygem-%{gem_name} | ||
Version: 0.5.0 | ||
Release: 1%{?dist} | ||
Summary: Ruby FFI bindings for llhttp | ||
License: MPL-2.0 | ||
URL: https://github.com/bryanp/llhttp/ | ||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | ||
|
||
# start specfile generated dependencies | ||
Requires: ruby >= 2.5.0 | ||
BuildRequires: ruby-devel >= 2.5.0 | ||
BuildRequires: rubygems-devel | ||
BuildRequires: (rubygem(ffi-compiler) >= 1.0 with rubygem(ffi-compiler) < 2) | ||
BuildRequires: (rubygem(rake) >= 13.0 with rubygem(rake) < 14) | ||
# Compiler is required for build of gem binary extension. | ||
# https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires | ||
BuildRequires: gcc | ||
# end specfile generated dependencies | ||
|
||
%description | ||
Ruby FFI bindings for llhttp. | ||
|
||
|
||
%package doc | ||
Summary: Documentation for %{name} | ||
Requires: %{name} = %{version}-%{release} | ||
BuildArch: noarch | ||
|
||
%description doc | ||
Documentation for %{name}. | ||
|
||
%prep | ||
%setup -q -n %{gem_name}-%{version} | ||
|
||
%build | ||
# Create the gem as gem install only works on a gem file | ||
gem build ../%{gem_name}-%{version}.gemspec | ||
|
||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir | ||
# by default, so that we can move it into the buildroot in %%install | ||
%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 %{buildroot}%{gem_instdir}/ext/%{_arch}-%{_target_os}/*.so %{buildroot}%{gem_extdir_mri}/%{gem_name} | ||
|
||
# Prevent dangling symlink in -debuginfo (rhbz#878863). | ||
#rm -rf %{buildroot}%{gem_instdir}/ext/ | ||
|
||
%check | ||
# Ideally, this would be something like this: | ||
# GEM_PATH="%{buildroot}%{gem_dir}:$GEM_PATH" ruby -e "require '%{gem_require_name}'" | ||
# But that fails to find native extensions on EL8, so we fake the structure that ruby expects | ||
mkdir gem_ext_test | ||
cp -a %{buildroot}%{gem_dir} gem_ext_test/ | ||
mkdir -p gem_ext_test/gems/extensions/%{_arch}-%{_target_os}/$(ruby -r rbconfig -e 'print RbConfig::CONFIG["ruby_version"]')/ | ||
cp -a %{buildroot}%{gem_extdir_mri} gem_ext_test/gems/extensions/%{_arch}-%{_target_os}/$(ruby -r rbconfig -e 'print RbConfig::CONFIG["ruby_version"]')/ | ||
GEM_PATH="./gem_ext_test/gems:$GEM_PATH" ruby -e "require '%{gem_require_name}'" | ||
rm -rf gem_ext_test | ||
|
||
%files | ||
%dir %{gem_instdir} | ||
%{gem_extdir_mri} | ||
%license %{gem_instdir}/LICENSE | ||
%{gem_instdir}/ext | ||
%{gem_libdir} | ||
%exclude %{gem_cache} | ||
%{gem_spec} | ||
|
||
%files doc | ||
%doc %{gem_docdir} | ||
%doc %{gem_instdir}/CHANGELOG.md | ||
%doc %{gem_instdir}/README.md | ||
|
||
%changelog | ||
* Fri Aug 23 2024 David Ochner <[email protected]> 0.5.0-1 | ||
- Add rubygem-llhttp-ffi generated by gem2rpm using the default template | ||
|