%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname test-unit %global geminstdir %{gemdir}/gems/%{gemname}-%{version} %global rubyabi 1.8 # svn repository # http://test-unit.rubyforge.org/svn/trunk/ Summary: Improved version of Test::Unit bundled in Ruby 1.8.x Name: rubygem-%{gemname} Version: 2.3.1 Release: 1%{?dist} Group: Development/Languages # lib/test/unit/diff.rb is under GPLv2 or Ruby or Python # Other file: GPLv2 or Ruby License: (GPLv2 or Ruby) and (GPLv2 or Ruby or Python) URL: http://rubyforge.org/projects/test-unit/ Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem # From upstream svn, ah.. Source1: rubygem-test-unit-2.3.1-missing-files.tar.gz BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: rubygems # For %%check #BuildRequires: rubygem(rake) #BuildRequires: rubygem(hoe) Requires: ruby(abi) = %{rubyabi} Requires: rubygems BuildArch: noarch Provides: rubygem(%{gemname}) = %{version}-%{release} %description Test::Unit 2.x - Improved version of Test::Unit bundled in Ruby 1.8.x. Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (Test::Unit 2.x) will be improved actively. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %setup -q -c -T mkdir -p .%{geminstdir} gem install \ -V \ --local \ --install-dir .%{gemdir} \ --force \ --rdoc \ %{SOURCE0} find . -name \*.gem | xargs chmod 0644 find . -type f | xargs chmod ugo+r pushd .%{geminstdir} # rdoc gem not needed sed -i -e '/rdoc/s|^gem|#gem|' Rakefile popd # Unpack missing files pushd .%{geminstdir} gunzip -dc %{SOURCE1} | tar xf - popd %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{gemdir} cp -a .%{gemdir}/* \ %{buildroot}%{gemdir}/ # Move bin/ script to standard path # The name "testrb" conflicts with ruby 1.8.x, rename it mkdir -p %{buildroot}/%{_bindir} mv %{buildroot}%{gemdir}/bin/* \ %{buildroot}/%{_bindir}/ rmdir %{buildroot}%{gemdir}/bin find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 0755 ## rename!! mv %{buildroot}%{_bindir}/testrb{,2} %clean rm -rf %{buildroot} %check pushd .%{geminstdir} #rake test --trace ruby -Ilib ./test/run-test.rb popd %files %defattr(-,root,root,-) %dir %{geminstdir} %doc %{geminstdir}/[A-Z]* %exclude %{geminstdir}/Rakefile %{_bindir}/testrb2 %{geminstdir}/bin/ %{geminstdir}/lib/ %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec %files doc %defattr(-,root,root,-) %{geminstdir}/Rakefile %{geminstdir}/sample/ %{geminstdir}/test/ %{gemdir}/doc/%{gemname}-%{version}/ %changelog * Sun Aug 14 2011 Mamoru Tasaka - 2.3.1-1 - 2.3.1 * Sun Apr 24 2011 Mamoru Tasaka - 2.3.0-1 - 2.3.0 * Fri Feb 18 2011 Mamoru Tasaka - 2.2.0-1 - 2.2.0 * Mon Feb 14 2011 Mamoru Tasaka - 2.1.2-2 - F-15 mass rebuild * Thu Nov 26 2010 Mamoru Tasaka - 2.1.2-1 - 2.1.2 * Sun Sep 19 2010 Mamoru Tasaka - 2.1.1-2 - Fix up license tag * Sat Sep 18 2010 Mamoru Tasaka - 2.1.1-1 - Initial package