Fix conditionals for F17 to work for RHEL 7 as well.
This commit is contained in:
parent
4937b90815
commit
192dce8dd2
@ -1,2 +0,0 @@
|
|||||||
install-so:
|
|
||||||
$(INSTALL_DATA) $(srcdir)/rb_cairo.h $(RUBYARCHDIR)
|
|
@ -3,12 +3,14 @@
|
|||||||
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
|
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} >= 17
|
%if %{?fedora:0%{fedora} >= 17}%{?rhel:0%{rhel} >= 7}
|
||||||
%global rubyabi 1.9.1
|
%global rubyabi 1.9.1
|
||||||
%global header_dir %{ruby_vendorarchdir}
|
%global header_dir %{ruby_vendorarchdir}
|
||||||
|
%global ruby19 1
|
||||||
%else
|
%else
|
||||||
%global rubyabi 1.8
|
%global rubyabi 1.8
|
||||||
%global header_dir %{ruby_sitearch}
|
%global header_dir %{ruby_sitearch}
|
||||||
|
%global ruby19 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global gem_name cairo
|
%global gem_name cairo
|
||||||
@ -18,7 +20,7 @@
|
|||||||
Summary: Ruby bindings for cairo
|
Summary: Ruby bindings for cairo
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.10.2
|
Version: 1.10.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: GPLv2 or Ruby
|
License: GPLv2 or Ruby
|
||||||
URL: http://cairographics.org/rcairo/
|
URL: http://cairographics.org/rcairo/
|
||||||
@ -38,7 +40,7 @@ Requires: ruby(abi) = %{rubyabi}
|
|||||||
Requires: rubygems
|
Requires: rubygems
|
||||||
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
||||||
|
|
||||||
%if 0%{?fedora} >= 17
|
%if %{ruby19}
|
||||||
Obsoletes: ruby-%{gem_name} = %{version}-%{release}
|
Obsoletes: ruby-%{gem_name} = %{version}-%{release}
|
||||||
Provides: ruby-%{gem_name} = %{version}-%{release}
|
Provides: ruby-%{gem_name} = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
@ -80,7 +82,7 @@ Requires: ruby-devel
|
|||||||
# Remove on F-17 and above
|
# Remove on F-17 and above
|
||||||
Obsoletes: ruby-cairo-devel < 1.9
|
Obsoletes: ruby-cairo-devel < 1.9
|
||||||
Provides: ruby-cairo-devel = %{version}-%{release}
|
Provides: ruby-cairo-devel = %{version}-%{release}
|
||||||
%if 0%{?fedora} < 17
|
%if %{ruby19} < 1
|
||||||
Provides: ruby(cairo-devel) = %{version}-%{release}
|
Provides: ruby(cairo-devel) = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -122,7 +124,7 @@ done
|
|||||||
|
|
||||||
# Move C extension library to some private directory
|
# Move C extension library to some private directory
|
||||||
pushd ./TMPINSTDIR/%{gem_instdir}
|
pushd ./TMPINSTDIR/%{gem_instdir}
|
||||||
%if 0%{?fedora} < 17
|
%if %{ruby19} < 1
|
||||||
grep -rl '%{gem_name}.so' . | \
|
grep -rl '%{gem_name}.so' . | \
|
||||||
xargs sed -i \
|
xargs sed -i \
|
||||||
-e "\@require@s|'%{gem_name}.so'|'%{gem_name}/%{gem_name}.so'|" \
|
-e "\@require@s|'%{gem_name}.so'|'%{gem_name}/%{gem_name}.so'|" \
|
||||||
@ -213,12 +215,12 @@ popd
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%if 0%{?fedora} < 17
|
%if %{ruby19} < 1
|
||||||
create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
|
create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?fedora} >= 17
|
%if %{ruby19}
|
||||||
export RUBYLIB=$(pwd)/TMPINSTDIR/%{gem_instdir}:$(pwd)/TMPINSTDIR/%{gem_extdir}/lib
|
export RUBYLIB=$(pwd)/TMPINSTDIR/%{gem_instdir}:$(pwd)/TMPINSTDIR/%{gem_extdir}/lib
|
||||||
%else
|
%else
|
||||||
export RUBYLIB=$(pwd)/TMPINSTDIR/%{ruby_sitearch}
|
export RUBYLIB=$(pwd)/TMPINSTDIR/%{ruby_sitearch}
|
||||||
@ -240,7 +242,7 @@ ruby ./test/run-test.rb
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%if 0%{fedora} < 17
|
%if %{ruby19} < 1
|
||||||
%dir %{ruby_sitearch}/%{gem_name}/
|
%dir %{ruby_sitearch}/%{gem_name}/
|
||||||
%{ruby_sitearch}/%{gem_name}/%{gem_name}.so
|
%{ruby_sitearch}/%{gem_name}/%{gem_name}.so
|
||||||
%else
|
%else
|
||||||
@ -263,7 +265,7 @@ popd
|
|||||||
%{gem_instdir}/test/
|
%{gem_instdir}/test/
|
||||||
%{gem_docdir}/
|
%{gem_docdir}/
|
||||||
|
|
||||||
%if 0%{?fedora} < 17
|
%if %{ruby19} < 1
|
||||||
%files -n ruby-%{gem_name}
|
%files -n ruby-%{gem_name}
|
||||||
%{ruby_sitelib}/%{gem_name}.rb
|
%{ruby_sitelib}/%{gem_name}.rb
|
||||||
%{ruby_sitelib}/%{gem_name}/
|
%{ruby_sitelib}/%{gem_name}/
|
||||||
@ -273,6 +275,9 @@ popd
|
|||||||
%{header_dir}/rb_cairo.h
|
%{header_dir}/rb_cairo.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 03 2012 Vít Ondruch <vondruch@redhat.com> - 1.10.2-4
|
||||||
|
- Fix conditionals for F17 to work for RHEL 7 as well.
|
||||||
|
|
||||||
* Sun Jan 29 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.10.2-3
|
* Sun Jan 29 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.10.2-3
|
||||||
- F-17: rebuild against ruby 1.9
|
- F-17: rebuild against ruby 1.9
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user