%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} Name: ruby-json Version: 1.1.6 Release: 1%{?dist} Summary: A JSON implementation in Ruby Group: Development/Languages License: Ruby and GPLv2 URL: http://json.rubyforge.org Source0: http://rubyforge.org/frs/download.php/56579/json-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: %{name}-destdir.patch BuildRequires: ruby ruby-devel BuildRequires: rubygem-rake Requires: ruby(abi) = 1.8 Provides: ruby(json) = %{version} %description This is a implementation of the JSON specification according to RFC 4627 in Ruby. You can think of it as a low fat alternative to XML, if you want to store data to disk or transmit it over a network rather than use a verbose markup language. %prep %setup -q -n json-%{version} %patch0 -p1 -b .destdir %build export CFLAGS="$RPM_OPT_FLAGS" export CONFIGURE_ARGS="--with-cflags='%{optflags}'" rake %install rm -rf $RPM_BUILD_ROOT env DESTDIR=$RPM_BUILD_ROOT rake install strip $RPM_BUILD_ROOT%{ruby_sitearch}/json/ext/*.so %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc RUBY GPL TODO CHANGES # README removed as has the same content as INSTALL-like file. %{ruby_sitelib}/json %{ruby_sitelib}/json.rb %{ruby_sitearch}/json %changelog * Sat Jun 06 2009 Xavier Lamien - 1.1.6-1 - Update release. * Tue May 12 2009 Xavier Lamien - 1.1.5-1 - Update release. * Thu Apr 02 2009 Xavier Lamien - 1.1.4-1 - Update release. * Sat Jul 12 2008 Xavier Lamien - 1.1.3-1 - Initial RPM release.