]> git.pld-linux.org Git - SPECS.git/blob - ruby-json_pure.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / ruby-json_pure.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define pkgname json_pure
6 Summary:        JSON Implementation for Ruby
7 Name:           ruby-%{pkgname}
8 Version:        1.8.1
9 Release:        1
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
19 %if %{with tests}
20 BuildRequires:  ruby-test-unit
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This is a JSON implementation in pure Ruby.
27
28 %prep
29 %setup -q -n %{pkgname}-%{version}
30
31 rm lib/json/ext/.keep
32
33 %build
34 # write .gemspec
35 %__gem_helper spec
36
37 %if %{with tests}
38 JSON=pure ruby -e 'Dir.glob "./tests/**/test_*.rb", &method(:require)'
39 %endif
40
41 %install
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}
46
47 %clean
48 rm -rf $RPM_BUILD_ROOT
49
50 %files
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
This page took 3.297038 seconds and 3 git commands to generate.