]> git.pld-linux.org Git - packages/ruby-yajl.git/blob - ruby-yajl.spec
4b8bbac543d57a0cb8fd4de904cf2813288db81d
[packages/ruby-yajl.git] / ruby-yajl.spec
1 # NOTE:
2 # - bundles modified yajl-1.0.12
3
4 # Conditional build:
5 %bcond_with     tests           # build without tests
6
7 %define rbname yajl-ruby
8 Summary:        Ruby C bindings to the excellent Yajl JSON stream-based parser library
9 Name:           ruby-yajl
10 Version:        1.2.1
11 Release:        2
12 License:        MIT
13 Group:          Development/Languages
14 Source0:        http://rubygems.org/downloads/%{rbname}-%{version}.gem
15 # Source0-md5:  61d4348658120c1e633417cdc3404390
16 URL:            http://rdoc.info/github/brianmario/yajl-ruby
17 BuildRequires:  rpm-rubyprov
18 BuildRequires:  rpmbuild(macros) >= 1.665
19 BuildRequires:  ruby-devel
20 %if %{with tests}
21 BuildRequires:  ruby-activesupport
22 BuildRequires:  ruby-json
23 BuildRequires:  ruby-rake-compiler >= 0.7.5
24 BuildRequires:  ruby-rspec >= 2.0.0
25 %endif
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 C binding to the excellent YAJL JSON parsing and generation library.
30
31 %prep
32 %setup -q
33
34 %build
35 %__gem_helper spec
36
37 cd ext/yajl
38 %{__ruby} extconf.rb
39 %{__make} V=1 \
40         CC="%{__cc}" \
41         LDFLAGS="%{rpmldflags}" \
42         CFLAGS="%{rpmcflags} -fPIC"
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir}/yajl,%{ruby_specdir}}
47 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
48 install -p ext/yajl/yajl.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}/yajl/yajl.so
49
50 cp -p %{rbname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
56 %defattr(644,root,root,755)
57 %doc CHANGELOG.md README.md MIT-LICENSE
58 %dir %{ruby_vendorarchdir}/yajl
59 %attr(755,root,root) %{ruby_vendorarchdir}/yajl/yajl.so
60 %{ruby_vendorlibdir}/yajl.rb
61 %{ruby_vendorlibdir}/yajl
62 %{ruby_specdir}/%{rbname}-%{version}.gemspec
This page took 0.037286 seconds and 2 git commands to generate.