]> git.pld-linux.org Git - packages/ruby-yajl.git/blob - ruby-yajl.spec
74fd8ab1ad3805324b1c214294ccf8c849826de4
[packages/ruby-yajl.git] / ruby-yajl.spec
1 %define rbname yajl-ruby
2 Summary:        Ruby C bindings to the excellent Yajl JSON stream-based parser library
3 Name:           ruby-yajl
4 Version:        1.1.0
5 Release:        0.2
6 License:        MIT
7 Group:          Development/Languages
8 URL:            http://rdoc.info/github/brianmario/yajl-ruby
9 Source0:        %{rbname}-%{version}.gem
10 # Source0-md5:  5f35141b89be7da3b279b65ea0f3c0c2
11 BuildRequires:  rpm-rubyprov
12 BuildRequires:  rpmbuild(macros) >= 1.656
13 BuildRequires:  ruby-devel
14 BuildRequires:  setup.rb
15 Requires:       ruby-activesupport
16 Requires:       ruby-json
17 Requires:       ruby-rake-compiler >= 0.7.5
18 Requires:       ruby-rspec >= 2.0.0
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 C binding to the excellent YAJL JSON parsing and generation library.
23
24 %prep
25 %setup -q
26
27 # ext build
28 cp -p %{_datadir}/setup.rb .
29
30 %build
31 ruby setup.rb config \
32         --prefix=%{_prefix} \
33         --siterubyver=%{ruby_vendorlibdir} \
34         --siterubyverarch=%{ruby_vendorarchdir} \
35
36 cd ext/yajl
37 # binary pkgs:
38 %{__ruby} extconf.rb
39 %{__make} \
40         CC="%{__cc}" \
41         LDFLAGS="%{rpmldflags}" \
42         CFLAGS="%{rpmcflags} -fPIC"
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 %{__ruby} setup.rb install \
47         --prefix=$RPM_BUILD_ROOT
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 %defattr(644,root,root,755)
54 %doc CHANGELOG.md README.md MIT-LICENSE
55 %attr(755,root,root) %{ruby_vendorarchdir}/yajl.so
56 %{ruby_vendorlibdir}/yajl.rb
57 %{ruby_vendorlibdir}/yajl
This page took 0.090986 seconds and 2 git commands to generate.