File ruby-rcairo.spec of Package ruby-rcairo

%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}

# norootforbuild

###############################################################################
# spec file for the Ruby bindings to rcairo                                   #
# released under the same license as the bindings			      #
# Please report bugs directly to j.j.kress@googlemail.com                     #
# Acknowledgements:							      #
#	* some parts from spec file from ruby:ruby-rcairo		      #
#	* Allisson Azevedo for his great Fedora spec file		      #
###############################################################################

Name:			ruby-rcairo
Version:		1.5.0
Release:		1
License:		Ruby

Group:			System/Libraries

Summary:		Ruby bindings for cairo
URL:			http://cairographics.org/rcairo

Source0:		rcairo-%{version}.tar.gz

Patch0:                 ruby-rcairo-buildfix.patch

BuildRoot:		%{_tmppath}/%{name}-%{version}-build

BuildRequires:	cairo-devel >= 1.2.0
BuildRequires:	ruby ruby-devel

Requires:		ruby >= 1.8

#Provides:		ruby(rcairo) = %{version}-%{release}
Provides:		ruby(cairo) = %{version}-%{release}

%description
Ruby bindings for cairo // cairo extension for Ruby

Cairo is a 2D graphics library with support for multiple output devices.
Currently supported output targets include the X Window System, win32, and
image buffers. Experimental backends include OpenGL (through glitz), Quartz,
XCB, PostScript and PDF file output.

%package devel
Summary:		Ruby-cairo development environment
Group:			Development/Libraries
Requires:		%{name} = %{version}-%{release}
Requires:		cairo-devel ruby-devel
Provides:		ruby(cairo-devel) = %{version}-%{release}
#Provides:		ruby(rcairo-devel) = %{version}-%{release}

%description devel
Header files and libraries for building a extension library for the
ruby-cairo



%prep
%setup -q -n rcairo-%{version}
%if %suse_version == 1020
%patch0 -p1
%endif

%{__chmod} 644 samples/scalable.rb
%{__chmod} 644 samples/text2.rb
%{__chmod} 644 samples/png.rb
%{__chmod} 644 samples/text-on-path.rb
%{__chmod} 644 samples/blur.rb

rm -f samples/.cvsignore

%build
ruby extconf.rb
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p"

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING GPL NEWS README samples
# For noarch packages: ruby_sitelib
%{ruby_sitelib}/cairo.rb
%{ruby_sitelib}/cairo/
# For arch-specific packages: ruby_sitearch
%{ruby_sitearch}/cairo.so

%files devel
%defattr(-,root,root,-)
%{ruby_sitearch}/rb_cairo.h


%changelog

openSUSE Build Service is sponsored by