%define buildrequires_ge()  %(LC_ALL="C" rpm -q --queryformat 'BuildRequires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
%define name ruby-v4l                                                       
%define version 0.1.2
%define release 0vl1
                                                                 
Name: %{name}
Summary: ruby/V4L is simple wapper of v4l(Video for Linux).
Version: %{version}                                                           
Release: %{release}                                                            
Source: http://ruby.ad-hoc.org/v4l/%{name}-%{version}.tar.bz2        
URL: http://rubyforge.org/projects/ruby-v4l/
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-root
License: LGPL
%buildrequires_ge ruby-devel
 
%description
ruby/V4L is simple wapper of v4l(Video for Linux).
In other words this library will only run on Linux machines which support a
video4linux-device. 

%prep                                
rm -rf $RPM_BUILD_ROOT                       
%setup -q
                          
%build
ruby extconf.rb
make
                                                                              
%install
rm -rf $RPM_BUILD_ROOT
make install sitearchdir=$RPM_BUILD_ROOT%{rarchdir}
 
%clean                                   
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,0755)
%{rarchdir}/*.so
%doc tests/*.rb

%changelog
* Tue Dec 20 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.1.2-0vl1
- new upstream release
- rebuilt with ruby-1.8
- changed Group:
- s/Copyright/License/

* Thu Nov 22 2001 Tomoya TAKA <tomoya@olive.plala.or.jp> 0.0.2-0vl2
- fix %%files section

* Tue Nov 20 2000 Kazuhisa TAKEI <takei@vinelinux.org> 0.0.2-0vl1
- initial package
