# template: default %global gem_name sqlite3 %global gem_require_name %{gem_name} Name: rubygem-%{gem_name} Version: 1.4.4 Release: 1%{?dist} Summary: This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org) License: BSD-3-Clause URL: https://github.com/sparklemotion/sqlite3-ruby Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # start specfile generated dependencies Requires: ruby >= 1.8.7 BuildRequires: ruby-devel >= 1.8.7 BuildRequires: rubygems-devel >= 1.3.5 # 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 BuildRequires: sqlite-devel %description This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org). You must have the SQLite engine installed in order to build this module. Note that this module is only compatible with SQLite 3.6.16 or newer. %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 .%{gem_extdir_mri}/%{gem_name}/*.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} %exclude %{gem_instdir}/.gemtest %license %{gem_instdir}/LICENSE %exclude %{gem_instdir}/Manifest.txt %exclude %{gem_instdir}/appveyor.yml %{gem_instdir}/faq %{gem_libdir} %{gem_instdir}/rakelib %{gem_instdir}/setup.rb %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/API_CHANGES.rdoc %doc %{gem_instdir}/CHANGELOG.rdoc %doc %{gem_instdir}/ChangeLog.cvs %{gem_instdir}/Gemfile %doc %{gem_instdir}/README.rdoc %{gem_instdir}/Rakefile %{gem_instdir}/test %changelog * Mon Dec 18 2023 Evgeni Golov 1.4.4-1 - Update to 1.4.4 * Thu May 05 2022 Evgeni Golov 1.4.2-1 - Update to 1.4.2 * Thu Mar 11 2021 Eric D. Helms - 1.3.13-7 - Rebuild against rh-ruby27 * Fri Mar 27 2020 Ewoud Kohl van Wijngaarden - 1.3.13-6 - Add check section to test native library * Tue Mar 17 2020 Zach Huntington-Meath - 1.3.13-5 - Bump packages to build for el8 * Mon Jan 27 2020 Zach Huntington-Meath - 1.3.13-4 - Update spec to include Obsoletes of rails-packaging version * Tue Jan 21 2020 Zach Huntington-Meath 1.3.13-3 - Bump to move the .so file to the proper place * Thu Dec 19 2019 Zach Huntington-Meath 1.3.13-2 - Bump for moving over to foreman-packaging * Tue Aug 14 2018 Eric D. Helms - 1.3.13-1 - Initial package