%define ruby	/usr/bin/ruby
%define rlibdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["rubylibdir"]')
%define rarchdir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["archdir"]')

Summary: ruby interface to the GNU Science Library
Name: rb-gsl
Version: 1.10.3
Release: 1%{?_dist_release}
License: GPLv2
Group: Development/Libraries
Source0: http://rubyforge.org/frs/download.php/28909/%{name}-%{version}.tar.gz
Patch0:  rb-gsl-1.10.3-shell.patch
URL: http://rb-gsl.rubyforge.org/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ruby-devel, gsl-devel, ruby-narray
Requires: ruby-narray

Vendor: Project Vine
Distribution: Vine Linux

%description
The Ruby/GSL provides a ruby interface to the GSL (GNU Scientific Library) for
numerical computation with ((<Ruby|URL:http://www.ruby-lang.org/en/>)). This requires 
the GSL library, which is found on the development website
((<URL:http://sources.redhat.com/gsl/>)).

%prep
%setup -q
%patch0 -p1 

%build
ruby setup.rb config --siterubyver=%{rlibdir} --sodir=%{rarchdir} -- --with-narray-include=%{rarchdir}
ruby setup.rb setup

%install
rm -rf $RPM_BUILD_ROOT
%ruby setup.rb install --prefix=${RPM_BUILD_ROOT}

%clean
rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README THANKS VERSION
%doc examples/ html/ rd/ tests/
%{rlibdir}/*
#{rarchdir}/rb_gsl.so

%changelog
* Sun Nov 16 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.10.3-1
- new upstream release, updated URL
- added Patch0 for typo fix
- applied new versioning policy
- fixed License to GPLv2
- built with gsl-1.11

* Sun Aug  5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.0-0vl2
- rebuilt with gsl-1.9

* Thu May 31 2007 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.9.0-0vl1
- new upstream release

* Mon Feb 28 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.6.1-0vl1
- new upstream release

* Mon Jan 24 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.6.0-0vl2
- add oper.rb to install files
- change setup.rb config option
- change to use setup.rb for install

* Mon Jan 24 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 1.6.0-0vl1
- new upstream release

* Wed Jun 23 2004 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.4.3-0vl1
- new upstream release

* Mon Apr 26 2004 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.3.11-0vl1
- new upstream release

* Wed Apr 14 2004 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.3.8-0vl1
- new upstream release

* Thu Apr 12 2004 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.3.7-0vl1
- first package
