Blame SPECS/rubygem-ffi.spec

9e74cd
%{?scl:%scl_package rubygem-%{gem_name}}
9e74cd
%{!?scl:%global pkg_name %{name}}
9e74cd
9e74cd
%global gem_name ffi
9e74cd
9e74cd
Name:           %{?scl_prefix}rubygem-%{gem_name}
9e74cd
Version:        1.9.10
9e74cd
Release:        7%{?dist}
9e74cd
Summary:        FFI Extensions for Ruby
9e74cd
Group:          Development/Languages
9e74cd
9e74cd
License:        BSD
9e74cd
URL:            http://wiki.github.com/ffi/ffi
9e74cd
Source0:        http://rubygems.org/gems/%{gem_name}-%{version}.gem
9e74cd
# Suppress deprecated Fixnum warnings on Ruby 2.4.0.
9e74cd
# https://github.com/ffi/ffi/pull/557
9e74cd
Patch0: rubygem-ffi-1.9.17-suppress-Fixnum-warning-ruby2.4.patch
9e74cd
9e74cd
Requires:       %{?scl_prefix_ruby}ruby(release)
9e74cd
Requires:       %{?scl_prefix_ruby}ruby(rubygems)
9e74cd
BuildRequires:  %{?scl_prefix_ruby}ruby-devel
9e74cd
BuildRequires:  %{?scl_prefix_ruby}rubygems-devel
9e74cd
BuildRequires:  libffi-devel
9e74cd
BuildRequires:  %{?scl_prefix}rubygem(rspec)
9e74cd
Requires:       %{?scl_prefix_ruby}ruby(rubygems)
9e74cd
Requires:       %{?scl_prefix_ruby}ruby(release)
9e74cd
Provides:       %{?scl_prefix}rubygem(%{gem_name}) = %{version}
9e74cd
9e74cd
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
9e74cd
%{?scl:Requires: %{?scl_prefix}runtime}
9e74cd
9e74cd
%description
9e74cd
Ruby-FFI is a ruby extension for programmatically loading dynamic
9e74cd
libraries, binding functions within them, and calling those functions
9e74cd
from Ruby code. Moreover, a Ruby-FFI extension works without changes
9e74cd
on Ruby and JRuby. Discover why should you write your next extension
9e74cd
using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].
9e74cd
9e74cd
%package   doc
9e74cd
Summary:   Documentation for %{pkg_name}
9e74cd
Group:     Documentation
9e74cd
Requires:  %{?scl_prefix}%{pkg_name} = %{version}-%{release}
9e74cd
9e74cd
%description	doc
9e74cd
This package contains documentation for %{pkg_name}.
9e74cd
9e74cd
%prep
9e74cd
%{?scl:scl enable %{scl} - << \EOF}
9e74cd
set -e
9e74cd
gem unpack %{SOURCE0}
9e74cd
%setup -q -D -T -n  %{gem_name}-%{version}
9e74cd
9e74cd
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
9e74cd
9e74cd
%patch0 -p1
9e74cd
%{?scl:EOF}
9e74cd
9e74cd
%build
9e74cd
9e74cd
# Create the gem as gem install only works on a gem file
9e74cd
%{?scl:scl enable %{scl} - << \EOF}
9e74cd
set -e
9e74cd
gem build %{gem_name}.gemspec
9e74cd
%gem_install
9e74cd
%{?scl:EOF}
9e74cd
9e74cd
%install
9e74cd
mkdir -p %{buildroot}%{gem_dir}
9e74cd
cp -pa .%{gem_dir}/* \
9e74cd
        %{buildroot}%{gem_dir}/
9e74cd
9e74cd
mkdir -p %{buildroot}%{gem_extdir_mri}
9e74cd
cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
9e74cd
9e74cd
pushd %{buildroot}
9e74cd
rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log}
9e74cd
popd
9e74cd
9e74cd
# Remove the binary extension sources and build leftovers.
9e74cd
rm -rf %{buildroot}%{gem_instdir}/ext
9e74cd
9e74cd
%check
9e74cd
pushd .%{gem_instdir}
9e74cd
%{?scl:scl enable %{scl} - << \EOF}
9e74cd
make -f libtest/GNUmakefile \
9e74cd
	JFLAGS="%{optflags}"
9e74cd
%{?scl:EOF}
9e74cd
9e74cd
# test dies on arm, disabling on the arch
9e74cd
%{?scl:scl enable %{scl} - << \EOF}
9e74cd
ruby -Ilib:ext/ffi_c -S \
9e74cd
	rspec spec
9e74cd
%{?scl:EOF}
9e74cd
9e74cd
popd
9e74cd
9e74cd
%files
9e74cd
# There is no %%license macro on RHEL6.
9e74cd
# https://bugzilla.redhat.com/show_bug.cgi?id=1386246
9e74cd
%{!?_licensedir:%global license %%doc}
9e74cd
9e74cd
%doc %{gem_instdir}/COPYING
9e74cd
%doc %{gem_instdir}/README.md
9e74cd
%license %{gem_instdir}/LICENSE
9e74cd
%dir %{gem_instdir}
9e74cd
9e74cd
%exclude %{gem_instdir}/Rakefile
9e74cd
%exclude %{gem_instdir}/gen
9e74cd
%exclude %{gem_instdir}/libtest
9e74cd
%exclude %{gem_instdir}/ffi.gemspec
9e74cd
9e74cd
%{gem_libdir}
9e74cd
%{gem_extdir_mri}/
9e74cd
%exclude %{gem_cache}
9e74cd
%{gem_spec}
9e74cd
9e74cd
%files doc
9e74cd
%doc %{gem_docdir}
9e74cd
%exclude %{gem_instdir}/spec
9e74cd
9e74cd
%changelog
9e74cd
* Mon Feb 13 2017 Jun Aruga <jaruga@redhat.com> - 1.9.10-7
9e74cd
- Improve patch for deprecated Fixnum warnings.
9e74cd
9e74cd
* Fri Feb 10 2017 Jun Aruga <jaruga@redhat.com> - 1.9.10-6
9e74cd
- Suppress deprecated Fixnum warnings on Ruby 2.4.0.
9e74cd
9e74cd
* Thu Apr 07 2016 Pavel Valena <pvalena@redhat.com> - 1.9.10-4
9e74cd
- Add scl macros
9e74cd
9e74cd
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.10-3
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9e74cd
9e74cd
* Fri Jan 08 2016 Vít Ondruch <vondruch@redhat.com> - 1.9.10-2
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
9e74cd
9e74cd
* Sat Oct  3 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.9.10-1
9e74cd
- 1.9.10
9e74cd
9e74cd
* Mon Jul 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.9.3-7
9e74cd
- Fix dangling symlinks in -debuginfo package.
9e74cd
9e74cd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.3-6
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9e74cd
9e74cd
* Fri Jan 23 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.9.3-5
9e74cd
- fixed to build on aarch64
9e74cd
9e74cd
* Fri Jan 16 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.9.3-4
9e74cd
- Rebuild for ruby 2.2 again
9e74cd
9e74cd
* Thu Jan 15 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.9.3-3
9e74cd
- Rebuild for ruby 2.2
9e74cd
- Use rspec2 for now
9e74cd
9e74cd
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.3-2
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9e74cd
9e74cd
* Thu Jun 05 2014 Dominic Cleal <dcleal@redhat.com> - 1.9.3-1
9e74cd
- Update to FFI 1.9.3
9e74cd
9e74cd
* Sat May  3 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.4.0-4
9e74cd
- F-21: rebuild for ruby 2.1 / rubygems 2.2
9e74cd
9e74cd
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-3
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9e74cd
9e74cd
* Tue Mar 26 2013 Vít Ondruch <vondruch@redhat.com> - 1.4.0-2
9e74cd
- Use %%{gem_extdir_mri} instead of %%{gem_extdir}.
9e74cd
9e74cd
* Wed Feb 20 2013 Vít Ondruch <vondruch@redhat.com> - 1.4.0-1
9e74cd
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
9e74cd
- Update to FFI 1.4.0.
9e74cd
9e74cd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-6
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9e74cd
9e74cd
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-5
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9e74cd
9e74cd
* Thu Feb 02 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.9-4
9e74cd
- Rebuilt for Ruby 1.9.3.
9e74cd
9e74cd
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9e74cd
9e74cd
* Tue Jun 14 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-2
9e74cd
- Fixed the License, it is actually LGPL
9e74cd
9e74cd
* Mon Jun 13 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-1
9e74cd
- Bring in 1.0.9 from upstream.
9e74cd
9e74cd
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-2
9e74cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9e74cd
9e74cd
* Wed Mar 10 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
9e74cd
- Power PC fixes from upstream which were found testing 0.6.2
9e74cd
9e74cd
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
9e74cd
- Pull in 0.6.2 from upstream
9e74cd
9e74cd
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-3
9e74cd
- Final updates based on package review
9e74cd
9e74cd
* Tue Feb 16 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-2
9e74cd
- Updates Based on code review comments
9e74cd
9e74cd
* Mon Feb 15 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-1
9e74cd
- Initial specfile