%global gem_name jamespath Name: rubygem-%{gem_name} Version: 0.5.1 Release: 1%{?dist} Summary: JMESpath declarative object searching Group: Development/Languages License: MIT URL: http://github.com/lsegal/jamespath Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildArch: noarch BuildRequires: rubygems-devel BuildRequires: rubygem(minitest) %if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7 Requires: ruby(release) Requires: ruby(rubygems) Provides: rubygem(%{gem_name}) = %{version} %endif %description JMESPath (JSON Matching Expression Path) is like XPath, but for JSON and other structured objects. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %files %doc %{gem_instdir}/LICENSE %dir %{gem_instdir}/ %{gem_libdir}/ %exclude %{gem_cache} %{gem_spec} %exclude %{gem_instdir}/.gitignore %files doc %doc %{gem_instdir}/README.md %doc %{gem_docdir}/ %{gem_instdir}/test/ %{gem_instdir}/Gemfile %{gem_instdir}/Rakefile %{gem_instdir}/samus.json %{gem_instdir}/%{gem_name}.gemspec %changelog * Wed Sep 17 2014 František Dvořák - 0.5.1-1 - Initial package