Repository navigation
Expand file tree
/
Copy pathruby-json.spec
More file actions
102 lines (84 loc) · 2.56 KB
/
Copy pathruby-json.spec
File metadata and controls
102 lines (84 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Conditional build:
%bcond_with tests # build without tests
%define pkgname json
Summary: JSON library for Ruby
Summary(pl.UTF-8): Biblioteka JSON dla języka Ruby
Name: ruby-%{pkgname}
Version: 3.1.0
Release: 1
License: Ruby
Group: Development/Languages
Source0: https://rubygems.org/downloads/%{pkgname}-%{version}.gem
# Source0-md5: d0f49c5fb8c9ed46077b7b4757a57ebb
URL: https://github.com/ruby/json
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
BuildRequires: ruby-devel
%if %{with tests}
BuildRequires: ruby-permutation
BuildRequires: ruby-sdoc < 0.4
BuildRequires: ruby-sdoc >= 0.3.16
%endif
Obsoletes: ruby-json-rubyforge
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This is a JSON implementation as a Ruby extension in C.
%description -l pl.UTF-8
Biblioteka JSON dla języka Ruby.
%package rdoc
Summary: HTML documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
Group: Documentation
Requires: ruby >= 1:1.8.7-4
BuildArch: noarch
%description rdoc
HTML documentation for %{pkgname}.
%description rdoc -l pl.UTF-8
Dokumentacja w formacie HTML dla %{pkgname}.
%package ri
Summary: ri documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie ri dla %{pkgname}
Group: Documentation
Requires: ruby
BuildArch: noarch
%description ri
ri documentation for %{pkgname}.
%description ri -l pl.UTF-8
Dokumentacji w formacie ri dla %{pkgname}.
%prep
%setup -q -n %{pkgname}-%{version}
%build
%__gem_helper spec
cd ext/json/ext/generator
%{__ruby} extconf.rb
%{__make}
cd ../parser
%{__ruby} extconf.rb
%{__make}
cd ../../../..
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir}/json/ext,%{ruby_specdir}}
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
install -p ext/json/ext/generator/generator.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/json/ext
install -p ext/json/ext/parser/parser.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/json/ext
cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES.md README.md COPYING BSDL LEGAL
%{ruby_vendorlibdir}/json
%{ruby_vendorlibdir}/json.rb
%dir %{ruby_vendorarchdir}/json
%dir %{ruby_vendorarchdir}/json/ext
%attr(755,root,root) %{ruby_vendorarchdir}/json/ext/generator.so
%attr(755,root,root) %{ruby_vendorarchdir}/json/ext/parser.so
%{ruby_specdir}/%{pkgname}-%{version}.gemspec
#%files rdoc
#%defattr(644,root,root,755)
#%{ruby_rdocdir}/%{name}-%{version}
#%files ri
#%defattr(644,root,root,755)
#%{ruby_ridir}/JSON