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

Summary:  OpenGL Interface for ruby
Summary(ja): OpenGLのRubyのための拡張モジュール
Name: %{name}
Version: 0.32g
Release: 1%{?_dist_release}
Source0: %{name}-%{version}.tar.gz
Patch0: %{name}-vine.patch
License: distributable
Group: Development/Libraries
URL:  http://www2.giganet.net/~yoshi/

Requires: ruby
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: freeglut-devel
BuildRequires: ruby
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux

%description
This is a module to use OpenGL+glut in ruby.

%description -l ja
このモジュールはrubyからOpenGL+glutを使用するためのモジュールです。

%prep
%setup -q -n opengl-%{version}

%patch0 -p1

%build
ruby extconf.rb
%__make


%install
rm -rf $RPM_BUILD_ROOT
%makeinstall sitelibdir=${RPM_BUILD_ROOT}%{rlibdir}

rm -rf sample/.svn

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc COPYRIGHT ChangeLog README.EUC sample/
%{rarchdir}/opengl.so
%{rarchdir}/glut.so

%changelog
* Sun Nov 23 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.32g-1vl5
- applied new versioning policy
- spec in UTF-8
- updated build dependency

* Fri Aug 10 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.32g-0vl3
- fix typo in spec file
- changed Group to Development/Libraries

* Wed May 31 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.32g-0vl2
- add patch to change path of ruby in sample script
- remove directory of sample/.svn

* Tue May 30 2006 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.23g-0vl1
- source update

* Sun Mar 20 2005 Seiya Nishizawa <seiya@kugi.kyoto-u.ac.jp> 0.23f-0vl1
- initial build for Vine Linux
