3 %bcond_with tests # build without tests
5 %define pkgname json_pure
6 Summary: JSON Implementation for Ruby
10 Group: Development/Languages
11 # TODO: License should be probably updated.
12 # https://github.com/flori/json/issues/213
13 License: GPLv2 or Ruby
14 Source0: http://rubygems.org/gems/%{pkgname}-%{version}.gem
15 # Source0-md5: 951f69022d98656b516b77bb8a98c605
16 URL: http://flori.github.com/json
17 BuildRequires: rpm-rubyprov
18 BuildRequires: rpmbuild(macros) >= 1.665
20 BuildRequires: ruby-test-unit
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 This is a JSON implementation in pure Ruby.
29 %setup -q -n %{pkgname}-%{version}
38 JSON=pure ruby -e 'Dir.glob "./tests/**/test_*.rb", &method(:require)'
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
44 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
45 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
48 rm -rf $RPM_BUILD_ROOT
51 %defattr(644,root,root,755)
52 %doc README-json-jruby.markdown README.rdoc COPYING-json-jruby COPYING CHANGES VERSION TODO
53 %{ruby_vendorlibdir}/json.rb
54 %{ruby_vendorlibdir}/json
55 %{ruby_specdir}/%{pkgname}-%{version}.gemspec