conditional logic to accomodate f18 and f19 package conventions

This commit is contained in:
Dan Allen 2013-03-05 18:27:43 +01:00
parent 94e044fafb
commit 558b60f067
2 changed files with 11 additions and 2 deletions

View File

@ -15,7 +15,13 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: asciidoctor-disable-use-of-pending.patch Patch0: asciidoctor-disable-use-of-pending.patch
# Patch1: works around nth-child selector bug in Nokogiri # Patch1: works around nth-child selector bug in Nokogiri
Patch1: asciidoctor-fix-nth-child-selectors.patch Patch1: asciidoctor-fix-nth-child-selectors.patch
%if 0%{?fedora} <= 18
Requires: ruby(abi) = 1.9.1
BuildRequires: ruby(abi) = 1.9.1
%else
Requires: ruby(release) Requires: ruby(release)
BuildRequires: ruby(release)
%endif
Requires: ruby(rubygems) Requires: ruby(rubygems)
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
BuildRequires: ruby(rubygems) BuildRequires: ruby(rubygems)
@ -52,10 +58,10 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch1 -p1 %patch1 -p1
%build %build
mkdir -p .%{gem_dir}
gem build %{gem_name}.gemspec gem build %{gem_name}.gemspec
%if 0%{?fedora} <= 18
mkdir -p .%{gem_dir}
gem install -V \ gem install -V \
--local \ --local \
--install-dir .%{gem_dir} \ --install-dir .%{gem_dir} \
@ -63,6 +69,9 @@ gem install -V \
--force \ --force \
--rdoc \ --rdoc \
%{gem_name}-%{version}.gem %{gem_name}-%{version}.gem
%else
%gem_install
%endif
%check %check
LANG=en_US.utf8 testrb -Ilib test/*_test.rb LANG=en_US.utf8 testrb -Ilib test/*_test.rb