rubygem-json_pure/rubygem-json_pure.spec

63 lines
1.6 KiB
RPMSpec
Raw Normal View History

2020-08-18 17:35:28 +08:00
%global gem_name json_pure
Summary: JSON Implementation for Ruby
Name: rubygem-%{gem_name}
Version: 2.6.2
2020-08-18 17:35:28 +08:00
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_instdir}/.*
%exclude %{gem_cache}
%{gem_spec}
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/LICENSE
%doc %{gem_instdir}/CHANGES.md
2020-08-18 17:35:28 +08:00
%doc %{gem_instdir}/VERSION
%files doc
%doc %{gem_docdir}
%{gem_instdir}/json*.gemspec
%changelog
* Tue Jun 28 2022 xu_ping <xuping33@h-partners.com> - 2.6.2-1
- Upgrade 2.6.2
2020-08-18 17:35:28 +08:00
* Tue Jul 28 2020 wutao <wutao61@huawei.com> - 1.8.1-1
- package init