%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')} %define rname has_many_polymorphs %define gitrev d637f99 %define alphatag 20110203git%{gitrev} %define github_owner fauna Name: ruby-%{rname} Version: 2.2 Release: 1%{?dist} Summary: An ActiveRecord plug-in for polymorphic associations Group: Development/Languages License: AFL URL: https://github.com/fauna/has_many_polymorphs # Steps to download this snapshot: # wget https://github.com/fauna/has_many_polymorphs/tarball/d637f999d256a32da27aedb7e8ccd70e2a90a636 Source0: %{github_owner}-%{rname}-stable-%{version}-7-gd637f99.tar.gz # RHEL5 compatibility BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: ruby(abi) = 1.8 Requires: rubygem(rails) >= 2.3.8 BuildRequires: ruby Provides: ruby(%{rname}) = %{version} %description An ActiveRecord plug-in for self-referential and double-sided polymorphic associations. %prep %setup -q -n %{github_owner}-%{rname}-%{gitrev} %build %install rm -rf %{buildroot} install -d %{buildroot}%{ruby_sitelib}/ cp -pr lib/* %{buildroot}%{ruby_sitelib}/ # RHEL5 compatibility %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc CHANGELOG LICENSE README %{ruby_sitelib}/%{rname}.rb %{ruby_sitelib}/%{rname}/ %changelog * Fri Jan 28 2011 Lukas Zapletal - 2.2-1 - Initial package