c37fed6
%global gem_name ffi
5e1beb5
c37fed6
Name:           rubygem-%{gem_name}
9110602
Version:        1.9.3
7728118
Release:        7%{?dist}
5e1beb5
Summary:        FFI Extensions for Ruby
5e1beb5
Group:          Development/Languages
5e1beb5
9110602
License:        BSD
5e1beb5
URL:            http://wiki.github.com/ffi/ffi
010f03d
Source0:	http://rubygems.org/gems/%{gem_name}-%{version}.gem
Dominic Cleal 51af046
Patch0: 	ffi-aarch64.patch
010f03d
010f03d
BuildRequires:  ruby-devel
010f03d
BuildRequires:  rubygems-devel
010f03d
BuildRequires:	libffi-devel
b9b44a0
%if 0%{?fedora} >= 22
b9b44a0
BuildRequires:	rubygem(rspec2)
b9b44a0
%else
010f03d
BuildRequires:	rubygem(rspec)
b9b44a0
%endif
010f03d
Requires:       ruby(rubygems)
90545f5
Requires:       ruby(release)
c37fed6
Provides:       rubygem(%{gem_name}) = %{version}
5e1beb5
5e1beb5
%description
5e1beb5
Ruby-FFI is a ruby extension for programmatically loading dynamic
5e1beb5
libraries, binding functions within them, and calling those functions
5e1beb5
from Ruby code. Moreover, a Ruby-FFI extension works without changes
5e1beb5
on Ruby and JRuby. Discover why should you write your next extension
5e1beb5
using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].
5e1beb5
5e1beb5
%prep
010f03d
gem unpack %{SOURCE0}
010f03d
%setup -q -D -T -n  %{gem_name}-%{version}
010f03d
010f03d
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
Dominic Cleal 51af046
%patch0 -p1
5e1beb5
5e1beb5
%build
010f03d
010f03d
# Create the gem as gem install only works on a gem file
010f03d
gem build %{gem_name}.gemspec
010f03d
90545f5
%gem_install
5e1beb5
5e1beb5
%install
010f03d
mkdir -p %{buildroot}%{gem_dir}
010f03d
cp -pa .%{gem_dir}/* \
010f03d
        %{buildroot}%{gem_dir}/
5e1beb5
29e7020
%if 0%{?fedora} >= 21
29e7020
mkdir -p %{buildroot}%{gem_extdir_mri}
29e7020
cp -a ./%{gem_extdir_mri}/* %{buildroot}%{gem_extdir_mri}/
29e7020
29e7020
pushd %{buildroot}
29e7020
rm -f .%{gem_extdir_mri}/{gem_make.out,mkmf.log}
29e7020
popd
29e7020
29e7020
%else
11c49be
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
11c49be
mv %{buildroot}%{gem_instdir}/lib/ffi_c.so %{buildroot}%{gem_extdir_mri}/lib/
5e1beb5
29e7020
%endif
29e7020
7728118
# Remove the binary extension sources and build leftovers.
7728118
rm -rf %{buildroot}%{gem_instdir}/ext
7728118
010f03d
%check
010f03d
pushd .%{gem_instdir}
010f03d
make -f libtest/GNUmakefile
aac116f
# test dies on arm, disabling on the arch
29e7020
%if 0%{?fedora} >= 21
29e7020
ruby -Ilib:ext/ffi_c -S \
29e7020
%endif
b9b44a0
%if 0%{?fedora} >= 22
b9b44a0
	rspec2 spec \
b9b44a0
%else
aac116f
	rspec spec \
b9b44a0
%endif
aac116f
%ifarch %{arm}
aac116f
		|| echo "Please investigate this"
aac116f
%endif
aac116f
010f03d
popd
5e1beb5
5e1beb5
%files
010f03d
%doc %{gem_instdir}/COPYING
010f03d
%doc %{gem_instdir}/README.md
c37fed6
%doc %{gem_instdir}/LICENSE
c37fed6
%doc %{gem_docdir}
c37fed6
%dir %{gem_instdir}
c37fed6
%{gem_instdir}/Rakefile
c37fed6
%{gem_instdir}/gen
010f03d
%exclude %{gem_instdir}/libtest
010f03d
%{gem_instdir}/ffi.gemspec
c37fed6
%{gem_libdir}
c37fed6
%{gem_instdir}/spec
11c49be
%{gem_extdir_mri}/
010f03d
%exclude %{gem_cache}
c37fed6
%{gem_spec}
5e1beb5
5e1beb5
5e1beb5
%changelog
7728118
* Mon Jul 20 2015 Vít Ondruch <vondruch@redhat.com> - 1.9.3-7
7728118
- Fix dangling symlinks in -debuginfo package.
7728118
d8c3b0f
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.3-6
d8c3b0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d8c3b0f
Dominic Cleal 51af046
* Fri Jan 23 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 1.9.3-5
Dominic Cleal 51af046
- fixed to build on aarch64
Dominic Cleal 51af046
d68b1a5
* Fri Jan 16 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.9.3-4
d68b1a5
- Rebuild for ruby 2.2 again
d68b1a5
58acc6f
* Thu Jan 15 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.9.3-3
58acc6f
- Rebuild for ruby 2.2
b9b44a0
- Use rspec2 for now
58acc6f
272f43d
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.3-2
272f43d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
272f43d
9110602
* Thu Jun 05 2014 Dominic Cleal <dcleal@redhat.com> - 1.9.3-1
9110602
- Update to FFI 1.9.3
9110602
29e7020
* Sat May  3 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.4.0-4
29e7020
- F-21: rebuild for ruby 2.1 / rubygems 2.2
29e7020
3ee91ac
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-3
3ee91ac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
3ee91ac
49e0be5
* Tue Mar 26 2013 Vít Ondruch <vondruch@redhat.com> - 1.4.0-2
49e0be5
- Use %%{gem_extdir_mri} instead of %%{gem_extdir}.
49e0be5
010f03d
* Wed Feb 20 2013 Vít Ondruch <vondruch@redhat.com> - 1.4.0-1
90545f5
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
010f03d
- Update to FFI 1.4.0.
010f03d
a2c26d5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-6
a2c26d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a2c26d5
c24b6cf
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-5
c24b6cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c24b6cf
c37fed6
* Thu Feb 02 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.9-4
c37fed6
- Rebuilt for Ruby 1.9.3.
c37fed6
4dc8eea
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3
4dc8eea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4dc8eea
aa85df8
* Tue Jun 14 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-2
aa85df8
- Fixed the License, it is actually LGPL
aa85df8
fa312d0
* Mon Jun 13 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-1
fa312d0
- Bring in 1.0.9 from upstream.
fa312d0
e0c0b5a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-2
e0c0b5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e0c0b5a
08a56bc
* Wed Mar 10 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
08a56bc
- Power PC fixes from upstream which were found testing 0.6.2
08a56bc
6991807
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
6991807
- Pull in 0.6.2 from upstream
6991807
5e1beb5
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-3
5e1beb5
- Final updates based on package review
5e1beb5
5e1beb5
* Tue Feb 16 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-2
5e1beb5
- Updates Based on code review comments
5e1beb5
5e1beb5
* Mon Feb 15 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-1
5e1beb5
- Initial specfile