From 3396d3217545decc3e9c6f01e8864b1fced6e5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 17 Apr 2012 15:45:02 +0200 Subject: [PATCH] Compatibility fixes with older Fedoras and RHELs. Add missing .gemspec. --- rubygem-mustache.spec | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/rubygem-mustache.spec b/rubygem-mustache.spec index 1d06da0..0873271 100644 --- a/rubygem-mustache.spec +++ b/rubygem-mustache.spec @@ -1,11 +1,26 @@ %global gem_name mustache +%if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 +%global rubyabi 1.8 + +%if 0%{?rhel} +%global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} +%global gem_libdir %{gem_instdir}/lib +%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem +%global gem_spec %{gem_dir}/specifications/%%{gem_name}-%{version}.gemspec +%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} +%endif + +%else %global rubyabi 1.9.1 +%endif + Summary: Framework-agnostic way to render logic-free views Name: rubygem-%{gem_name} Version: 0.99.4 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/Languages License: MIT URL: http://github.com/defunkt/mustache @@ -14,7 +29,11 @@ Requires: ruby(abi) = %{rubyabi} Requires: ruby(rubygems) Requires: ruby BuildRequires: ruby(abi) = %{rubyabi} +%if 0%{?fedora} BuildRequires: rubygems-devel +%else +BuildRequires: rubygems +%endif BuildRequires: ruby BuildRequires: rubygem(minitest) BuildArch: noarch @@ -77,9 +96,9 @@ popd %{_bindir}/mustache %doc %{gem_instdir}/README.md %doc %{gem_instdir}/LICENSE -%{gem_cache} -%exclude %{gem_spec} -%exclude %{gem_instdir}/man +%exclude %{gem_cache} +%{gem_spec} +%{gem_instdir}/man %doc %{_mandir}/man1/* %doc %{_mandir}/man5/* @@ -89,6 +108,10 @@ popd %{gem_instdir}/test %changelog +* Tue Apr 17 2012 Vít Ondruch - 0.99.4-4 +- Compatibility fixes with older Fedoras and RHELs. +- Add missing .gemspec. + * Fri Jan 20 2012 Vít Ondruch - 0.99.4-3 - Rebuilt for Ruby 1.9.3.