Blob Blame History Raw
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname    pathname2
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}

Name:           rubygem-%{gemname}
Version:        1.6.2
Release:        6%{?dist}
Summary:        An alternate implementation for the Pathname library

Group:          Development/Languages
License:        Artistic 2.0
URL:            http://raa.ruby-lang.org/project/pathname2/
Source0:        http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem

Patch0:        ruby_1_8_test_pathname.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires: rubygem(facade)
BuildRequires: rubygem(rake)
BuildRequires: rubygems
BuildRequires: ruby(abi) = 1.8

Requires:      rubygem(facade)
Requires:      rubygems
Requires:      ruby(abi) = 1.8

Provides:      rubygem(%{gemname}) = %{version}

%description
An alternate implementation for the Pathname library. This version treats a
 path name as a String, though with certain methods overloaded.

%prep
%setup -q -c -T

%{__mkdir_p} .%{gemdir}
gem install --local --install-dir=.%{gemdir} \
   --force --rdoc %{SOURCE0}

pushd .%{geminstdir}/test
%patch0 -p0
popd

%build

%install
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{gemdir}
%{__cp} -a .%{gemdir}/* %{buildroot}%{gemdir}/

%check
ruby -I$(pwd)%{geminstdir}/lib $(pwd)%{geminstdir}/test/test_pathname.rb

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%dir %{geminstdir}
%doc %{gemdir}/doc/%{gemname}-%{version}
%doc %{geminstdir}/CHANGES
%doc %{geminstdir}/MANIFEST
%doc %{geminstdir}/README
%{gemdir}/cache/%{gemname}-%{version}.gem
%{geminstdir}/benchmarks
%{geminstdir}/examples
%{geminstdir}/lib
%{geminstdir}/test
%{gemdir}/specifications/%{gemname}-%{version}.gemspec

%changelog
* Tue Sep 08 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-6
- change defines to globals.

* Mon Aug 24 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-5
- change install method to allow use of patch macro.
- remove period at the end of summary.

* Mon Aug 24 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-4
- Add check section for running tests.
- Simplify a few things in the files section. 
- Add patch for running tests on ruby 1.8

* Thu Aug 20 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-3
- Fix a few more spec file issues, as noted in https://bugzilla.redhat.com/show_bug.cgi?id=518083

* Thu Aug 20 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-2
- Fix a few spec file issues, as noted in https://bugzilla.redhat.com/show_bug.cgi?id=518083

* Tue Aug 18 2009 Brett Lentz <wakko666@gmail.com> - 1.6.2-1
- First packaging.