[rubygem-gettext/f17: 1/2] Fix conditionals for F17 to work for RHEL 7 as well.
Vít Ondruch
vondruch at fedoraproject.org
Tue Apr 3 07:42:14 UTC 2012
commit 2844c148c78d67b7cc21bb2d2b77d839a3fd5b3d
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Apr 3 09:41:43 2012 +0200
Fix conditionals for F17 to work for RHEL 7 as well.
rubygem-gettext.spec | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/rubygem-gettext.spec b/rubygem-gettext.spec
index 1a863a1..798d787 100644
--- a/rubygem-gettext.spec
+++ b/rubygem-gettext.spec
@@ -1,8 +1,10 @@
-%if 0%{?fedora} < 17
+%if %{?fedora:0%{fedora} < 17}%{?rhel:0%{rhel} < 7}
%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
%global rubyabi 1.8
+%global ruby19 0
%else
%global rubyabi 1.9.1
+%global ruby19 1
%endif
%global gem_name gettext
@@ -13,7 +15,7 @@
Name: rubygem-%{gem_name}
Version: 2.1.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: RubyGem of Localization Library and Tools for Ruby
Group: Development/Languages
@@ -43,7 +45,7 @@ Requires: rubygem(locale) >= %{locale_ver}
Requires: irb
Provides: rubygem(%{gem_name}) = %{version}-%{release}
-%if 0%{?fedora} >= 17
+%if 0%{?ruby19} > 0
Obsoletes: ruby-gettext-package = %{version}-%{release}
Provides: ruby-gettext-package = %{version}-%{release}
%endif
@@ -96,7 +98,7 @@ gem install \
pushd .%{gem_instdir}
%patch0 -p0
%patch1 -p1
-%if 0%{?fedora} >= 17
+%if 0%{?ruby19} > 0
%patch10 -p1
%endif
popd
@@ -184,18 +186,18 @@ popd
}
-%if 0%{?fedora} < 17
+%if 0%{?ruby19} < 1
create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
%endif
create_symlink_rec %{gem_instdir}/bin %{_bindir}
-%if 0%{?fedora} < 17
+%if 0%{?ruby19} < 1
create_symlink_rec %{gem_instdir}/data/locale %{_datadir}/locale
%endif
# For --short-circult
%{__rm} -f *.lang
-%if 0%{?fedora} < 17
+%if 0%{?ruby19} < 1
%find_lang rgettext
%{__cat} *.lang >> %{name}.lang
%endif
@@ -249,7 +251,7 @@ rake test
%{gem_instdir}/test.rb
%{gem_instdir}/test/
-%if 0%{?fedora} < 17
+%if 0%{?ruby19} < 1
%files -n ruby-gettext-package -f %{name}.lang
%defattr(-,root,root,-)
%{ruby_sitelib}/%{gem_name}.rb
@@ -258,6 +260,9 @@ rake test
%changelog
+* Tue Apr 03 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 2.1.0-7
+- Fix conditionals for F17 to work for RHEL 7 as well.
+
* Sun Jan 29 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 2.1.0-6
- F-17: rebuild against ruby 1.9
More information about the scm-commits
mailing list