rubygem-ffi/rubygem-ffi.spec

118 lines
3.7 KiB
RPMSpec
Raw Normal View History

2012-02-02 15:20:23 +00:00
%global gem_name ffi
%global libname %{gem_name}_c.so
2011-06-13 16:18:06 +00:00
%global githubhash b79eb61
%global githubbuild 0
%global tarballname ffi-ffi-%{version}-%{githubbuild}-g%{githubhash}
%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
Release: 5%{?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)
2012-02-02 15:20:23 +00:00
BuildRequires: ruby ruby-devel rubygems-devel rubygem(rake) rubygem(rake-compiler) libffi-devel rubygem(rspec-core)
BuildRequires: ruby-devel
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)
Requires: ruby(abi) = 1.9.1
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}
install -d -m0755 %{buildroot}%{gem_extdir}/lib
cp -R %{_builddir}/%{gitinternalname}/geminst/* %{buildroot}%{gem_dir}
mv %{buildroot}%{gem_libdir}/%{libname} %{buildroot}%{gem_extdir}/lib/%{libname}
rm -rf %{buildroot}%{gem_libdir}/%{libname}
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
%{gem_extdir}/
%{gem_cache}
%{gem_spec}
2010-02-22 14:13:24 +00:00
%changelog
* 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.
* 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.
* 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