%global gem_name json_pure Summary: JSON Implementation for Ruby Name: rubygem-%{gem_name} Version: 1.8.1 Release: 1 License: GPLv2 or Ruby URL: http://flori.github.com/json Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) rubygems-devel rubygem(bigdecimal) rubygem(test-unit) BuildArch: noarch %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name} %description This is a JSON implementation in pure Ruby. %prep %setup -q -c -T %gem_install -n %{SOURCE0} %build %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file done for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x`; do [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file done %check pushd .%{gem_instdir} JSON=pure ruby -e 'Dir.glob "./tests/**/test_*.rb", &method(:require)' popd %files %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_libdir}/json/ext/.* %exclude %{gem_instdir}/.* %exclude %{gem_instdir}/diagrams %exclude %{gem_instdir}/ext %exclude %{gem_instdir}/java %exclude %{gem_cache} %{gem_spec} %doc %{gem_instdir}/README-json-jruby.markdown %doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/GPL %doc %{gem_instdir}/COPYING-json-jruby %doc %{gem_instdir}/COPYING %doc %{gem_instdir}/CHANGES %doc %{gem_instdir}/VERSION %doc %{gem_instdir}/TODO %files doc %{gem_instdir}/tests %{gem_instdir}/data %{gem_instdir}/tools %{gem_instdir}/Gemfile %{gem_instdir}/Rakefile %doc %{gem_docdir} %{gem_instdir}/install.rb %{gem_instdir}/json*.gemspec %changelog * Tue Jul 28 2020 wutao - 1.8.1-1 - package init