%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} %define rname activerecord # Only run the tests on distros that have sqlite3 %define with_check 0 Name: ruby-%{rname} Version: 2.0.1 Release: 1%{?dist} Summary: Implements the ActiveRecord pattern for ORM Group: Development/Languages License: MIT URL: http://rubyforge.org/projects/activerecord/ Source0: http://rubyforge.org/frs/download.php/28874/activerecord-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: ruby >= 1.8 %if %with_check BuildRequires: ruby(active_support) = 2.0.1 BuildRequires: ruby(sqlite3) %endif Requires: ruby(abi) = 1.8 Requires: ruby(active_support) = 2.0.1 Provides: ruby(active_record) = %{version} %description Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM. It ties database tables and classes together for business objects, like Customer or Subscription, that can find, save, and destroy themselves without resorting to manual SQL. %prep %setup -q -n %{rname}-%{version} chmod 0644 README %build %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/%{ruby_sitelib}/ cp -pr lib/* $RPM_BUILD_ROOT/%{ruby_sitelib}/ find $RPM_BUILD_ROOT/%{ruby_sitelib} -type f | xargs chmod a-x %check %if %with_check cd test ruby -I "connections/native_sqlite3" base_test.rb %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{ruby_sitelib}/activerecord.rb %{ruby_sitelib}/active_record.rb %{ruby_sitelib}/active_record %doc README CHANGELOG examples/ %changelog * Mon Dec 10 2007 David Lutterkort - 2.0.1-1 - New version * Thu Nov 29 2007 David Lutterkort - 1.15.6-1 - New version * Fri Jan 19 2007 David Lutterkort - 1.15.1-1 - New version - Remove patch fix_ar_tests_accounts.diff, fixed upstream (ticket 5268) * Wed Nov 15 2006 David Lutterkort - 1.14.4-2 - Run test suite for Fedora; requires patch0 to run successfully * Wed Nov 8 2006 David Lutterkort - 1.14.4-1 - New upstream version * Tue Sep 26 2006 David Lutterkort - 1.14.2-2 - Fix permissions on README * Fri Sep 8 2006 David Lutterkort - 1.14.2-1 - Initial specfile