%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} Name: ruby-postgres Version: 0.7.1 Release: 5%{?dist} Summary: A Ruby interface for the PostgreSQL database engine Group: Development/Languages # Source says that ruby-gems-postgres is distributable under the same # terms as ruby. License: Ruby License URL: http://ruby.scripting.ca/postgres/ Source: http://ruby.scripting.ca/postgres/archive/ruby-postgres-0.7.1.tar.gz Patch0: cflags.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Requires: ruby >= 1.3 Requires: ruby(abi) = 1.8 BuildRequires: ruby >= 1.3 BuildRequires: postgresql-devel >= 6.5 BuildRequires: ruby-devel Provides: ruby(postgres) = %{version} %description Database driver to access PostgreSQL databases from Ruby. %prep %setup -q %patch -p1 chmod a-x sample/psql.rb %build ruby extconf.rb --with-cflags="$RPM_OPT_FLAGS" make %install rm -rf $RPM_BUILD_ROOT make %{?_smp_mflags} DESTDIR=%{buildroot} install %clean rm -rf %{buildroot} %files %defattr(-, root, root) %doc ChangeLog README README.ja doc sample %{ruby_sitearch}/postgres.so %changelog * Wed Sep 13 2006 David Lutterkort - 0.7.1-5 - Rebuilt for FC6 * Wed Aug 2 2006 David Lutterkort - 0.7.1-4 - Fix CFLAGS - Add id to buildroot path * Tue Jul 11 2006 David Lutterkort - 0.7.1-3 - Bring in accordance with packaging guidelines - Changed license from 'Distributable' to 'Ruby License' * Mon Jun 5 2006 David Lutterkort - 0.7.1-2 - Clean build root for install * Wed May 24 2006 David Lutterkort - 0.7.1-1 - Initial build