2014-03-28 17:15:36 +00:00
|
|
|
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
|
|
|
|
%global gem_name ffi
|
|
|
|
%global libname %{gem_name}_c.so
|
|
|
|
%global githubhash b79eb61
|
|
|
|
%global githubbuild 0
|
|
|
|
%global tarballname ffi-ffi-%{version}-%{githubbuild}-g%{githubhash}
|
2011-06-13 16:18:06 +00:00
|
|
|
%global gitinternalname ffi-ffi-%{githubhash}
|
2010-02-22 14:13:24 +00:00
|
|
|
|
2012-02-02 15:20:23 +00:00
|
|
|
Name: rubygem-%{gem_name}
|
2011-06-13 16:18:06 +00:00
|
|
|
Version: 1.0.9
|
2014-03-28 17:15:36 +00:00
|
|
|
Release: 9%{?dist}
|
2010-02-22 14:13:24 +00:00
|
|
|
Summary: FFI Extensions for Ruby
|
|
|
|
Group: Development/Languages
|
|
|
|
|
2011-06-14 16:02:30 +00:00
|
|
|
License: LGPLv3
|
2010-02-22 14:13:24 +00:00
|
|
|
URL: http://wiki.github.com/ffi/ffi
|
|
|
|
# The source file is hosted at github. You can access this tarball with
|
|
|
|
# the following link:
|
2011-06-13 16:18:06 +00:00
|
|
|
# http://github.com/ffi/ffi/tarball/1.0.9
|
2010-02-22 14:13:24 +00:00
|
|
|
Source0: %{tarballname}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
2014-03-28 17:15:36 +00:00
|
|
|
BuildRequires: ruby-devel rubygems-devel rubygem(rake) rubygem(rake-compiler) libffi-devel rubygem(rspec-core)
|
2010-02-22 14:13:24 +00:00
|
|
|
BuildRequires: pkgconfig
|
2011-06-13 16:18:06 +00:00
|
|
|
Requires: libffi
|
2012-02-02 15:20:23 +00:00
|
|
|
Requires: ruby(rubygems)
|
2013-01-07 18:09:14 +00:00
|
|
|
Requires: ruby(abi) = 1.8
|
2012-02-02 15:20:23 +00:00
|
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Ruby-FFI is a ruby extension for programmatically loading dynamic
|
|
|
|
libraries, binding functions within them, and calling those functions
|
|
|
|
from Ruby code. Moreover, a Ruby-FFI extension works without changes
|
|
|
|
on Ruby and JRuby. Discover why should you write your next extension
|
|
|
|
using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].
|
|
|
|
|
|
|
|
%prep
|
2011-06-13 16:18:06 +00:00
|
|
|
%setup -q -n %{gitinternalname}
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
|
|
|
rake gem
|
2012-02-02 15:20:23 +00:00
|
|
|
gem install -V -d --local --no-ri -i ./geminst --force pkg/%{gem_name}-%{version}.gem
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
mkdir %{buildroot}
|
2012-02-02 15:20:23 +00:00
|
|
|
install -d -m0755 %{buildroot}%{gem_dir}
|
2014-03-28 17:15:36 +00:00
|
|
|
install -d -m0755 %{buildroot}%{ruby_sitearch}
|
2012-02-02 15:20:23 +00:00
|
|
|
cp -R %{_builddir}/%{gitinternalname}/geminst/* %{buildroot}%{gem_dir}
|
2014-03-28 17:15:36 +00:00
|
|
|
mv %{buildroot}%{gem_libdir}/%{libname} %{buildroot}%{ruby_sitearch}/%{libname}
|
2012-02-02 15:20:23 +00:00
|
|
|
rm -rf %{buildroot}%{gem_instdir}/ext
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
%check
|
2012-02-02 15:20:23 +00:00
|
|
|
# https://github.com/ffi/ffi/issues/189
|
|
|
|
sed -i -e 's| -mimpure-text||' libtest/GNUmakefile
|
2011-06-13 16:18:06 +00:00
|
|
|
rake -v test
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2012-02-02 15:20:23 +00:00
|
|
|
%doc %{gem_instdir}/README.rdoc
|
|
|
|
%doc %{gem_instdir}/History.txt
|
|
|
|
%doc %{gem_instdir}/LICENSE
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
%dir %{gem_instdir}
|
2011-06-13 16:18:06 +00:00
|
|
|
# This file does not exist in 15
|
|
|
|
%if 0%{?fedora} <= 14
|
2012-02-02 15:20:23 +00:00
|
|
|
%{gem_instdir}/.require_paths
|
2011-06-13 16:18:06 +00:00
|
|
|
%endif
|
2012-02-02 15:20:23 +00:00
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
%{gem_instdir}/gen
|
|
|
|
%{gem_libdir}
|
|
|
|
%{gem_instdir}/spec
|
|
|
|
%{gem_instdir}/tasks
|
2014-03-28 17:15:36 +00:00
|
|
|
%{ruby_sitearch}/%{libname}
|
2012-02-02 15:20:23 +00:00
|
|
|
%{gem_cache}
|
|
|
|
%{gem_spec}
|
2010-02-22 14:13:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2014-03-28 17:15:36 +00:00
|
|
|
* Wed Mar 26 2014 Dominic Cleal <dcleal@redhat.com> - 1.0.9-9
|
|
|
|
- Fix install location of built library and gemspec (RHBZ#975332)
|
|
|
|
|
2013-01-07 18:09:14 +00:00
|
|
|
* Thu Jan 07 2013 Bryan Kearney <bkearney@redhat.com> - 1.0.9-8
|
|
|
|
- Change the ruby version back to 1.8
|
|
|
|
|
2013-01-03 19:17:24 +00:00
|
|
|
* Thu Jan 03 2013 Bryan Kearney <bkearney@redhat.com> - 1.0.9-7
|
2013-01-03 18:56:23 +00:00
|
|
|
- Add the gem macros which rubygems-devel would have provided
|
|
|
|
|
2013-01-02 21:34:52 +00:00
|
|
|
* Wed Jan 01 2013 Bryan Kearney <bkearney@redhat.com> - 1.0.9-6
|
|
|
|
- Change dependency to rubygems instead of rubgems-devel
|
|
|
|
|
2012-07-21 17:51:59 +00:00
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
|
2012-02-02 15:20:23 +00:00
|
|
|
* Thu Feb 02 2012 Vít Ondruch <vondruch@redhat.com> - 1.0.9-4
|
|
|
|
- Rebuilt for Ruby 1.9.3.
|
|
|
|
|
2012-01-14 03:09:35 +00:00
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
|
2011-06-14 16:02:30 +00:00
|
|
|
* Tue Jun 14 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-2
|
|
|
|
- Fixed the License, it is actually LGPL
|
|
|
|
|
2011-06-13 16:18:06 +00:00
|
|
|
* Mon Jun 13 2011 Bryan Kearney <bkearney@redhat.com> - 1.0.9-1
|
|
|
|
- Bring in 1.0.9 from upstream.
|
|
|
|
|
2011-02-09 09:50:58 +00:00
|
|
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
|
2010-03-10 13:56:43 +00:00
|
|
|
* Wed Mar 10 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
|
|
|
|
- Power PC fixes from upstream which were found testing 0.6.2
|
|
|
|
|
2010-03-08 17:30:38 +00:00
|
|
|
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.6.2-1
|
|
|
|
- Pull in 0.6.2 from upstream
|
|
|
|
|
2010-02-22 14:13:24 +00:00
|
|
|
* Tue Feb 22 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-3
|
|
|
|
- Final updates based on package review
|
|
|
|
|
|
|
|
* Tue Feb 16 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-2
|
|
|
|
- Updates Based on code review comments
|
|
|
|
|
|
|
|
* Mon Feb 15 2010 Bryan Kearney <bkearney@redhat.com> - 0.5.4-1
|
|
|
|
- Initial specfile
|