Compatibility fixes with older Fedoras and RHELs.

Add missing .gemspec.
This commit is contained in:
Vít Ondruch 2012-04-17 15:45:02 +02:00
parent af93b7485a
commit 3396d32175

View File

@ -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 <vondruch@redhat.com> - 0.99.4-4
- Compatibility fixes with older Fedoras and RHELs.
- Add missing .gemspec.
* Fri Jan 20 2012 Vít Ondruch <vondruch@redhat.com> - 0.99.4-3
- Rebuilt for Ruby 1.9.3.