[rubygem-test-unit] 2.5.3

Mamoru Tasaka mtasaka at fedoraproject.org
Thu Jan 3 08:47:08 UTC 2013


commit b75162ac314f1a1b4ddb2c9c17fda8510ef62701
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Thu Jan 3 17:46:26 2013 +0900

    2.5.3

 .gitignore             |    1 +
 rubygem-test-unit.spec |  103 ++++++++++++++++++++++++------------------------
 sources                |    2 +-
 3 files changed, 53 insertions(+), 53 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index aac37b4..0acb6d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
 /test-unit-2.4.3.gem
 /test-unit-2.4.4.gem
 /test-unit-2.4.5.gem
+/test-unit-2.5.3.gem
diff --git a/rubygem-test-unit.spec b/rubygem-test-unit.spec
index e198014..803d20a 100644
--- a/rubygem-test-unit.spec
+++ b/rubygem-test-unit.spec
@@ -1,37 +1,24 @@
-%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
-%global	ruby19	0
-
-%if %{?fedora:0%{fedora} >= 17}%{?rhel:0%{rhel} >= 7}
-%global	gemdir	%{gem_dir}
-%global	gem_name	%{gemname}
-%global	geminstdir	%{gem_instdir}
+%global	gem_name	test-unit
 %global	rubyabi	1.9.1
-%global	ruby19	1
-%endif
 
 # 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.4.5
-Release:	4%{?dist}
+Name:		rubygem-%{gem_name}
+Version:	2.5.3
+Release:	1%{?dist}
 Group:		Development/Languages
 # lib/test/unit/diff.rb is under GPLv2 or Ruby or Python
+# lib/test-unit.rb is under LGPLv2+ or Ruby
 # Other file: GPLv2 or Ruby
-License:	(GPLv2 or Ruby) and (GPLv2 or Ruby or Python)
+License:	(GPLv2 or Ruby) and (GPLv2 or Ruby or Python) and (LGPLv2+ or Ruby)
 URL:		http://rubyforge.org/projects/test-unit/
 
-Source0:	http://rubygems.org/gems/%{gemname}-%{version}.gem
+Source0:	http://rubygems.org/gems/%{gem_name}-%{version}.gem
 BuildRequires:	ruby(abi) = %{rubyabi}
 BuildRequires:	rubygems
-%if 0%{?ruby19} > 0
 BuildRequires:	rubygems-devel
-%endif
 # For %%check
 #BuildRequires:	rubygem(rake)
 #BuildRequires:	rubygem(hoe)
@@ -39,7 +26,7 @@ Requires:	ruby(abi) = %{rubyabi}
 Requires:	rubygems
 
 BuildArch:	noarch
-Provides:	rubygem(%{gemname}) = %{version}-%{release}
+Provides:	rubygem(%{gem_name}) = %{version}-%{release}
 
 %description
 Test::Unit 2.x - Improved version of Test::Unit bundled in
@@ -58,65 +45,77 @@ This package contains documentation for %{name}.
 
 %prep
 %setup -q -c -T
+# Gem repack
+TOPDIR=$(pwd)
+mkdir tmpunpackdir
+pushd tmpunpackdir
+
+gem unpack %{SOURCE0}
+cd %{gem_name}-%{version}
+
+gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
+gem build %{gem_name}.gemspec
+mv %{gem_name}-%{version}.gem $TOPDIR
+
+popd
+rm -rf tmpunpackdir
 
-mkdir -p .%{geminstdir}
+%build
+mkdir -p .%{gem_dir}
 gem install \
 	-V \
 	--local \
-	--install-dir .%{gemdir} \
+	--install-dir .%{gem_dir} \
 	--force \
 	--rdoc \
-	%{SOURCE0}
+	%{gem_name}-%{version}.gem
 
-find . -name \*.gem | xargs chmod 0644
+#find . -name \*.gem | xargs chmod 0644
 find . -type f | xargs chmod ugo+r
 
-%build
-
 %install
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* \
-	%{buildroot}%{gemdir}/
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+	%{buildroot}%{gem_dir}/
 
-# 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}
+# Keep testrb2
+mkdir %{buildroot}%{_bindir}
+cat %{_bindir}/testrb | \
+	sed -e '\@require at s|test/unit|test-unit|' \
+	> %{buildroot}%{_bindir}/testrb2
+chmod 0755 %{buildroot}%{_bindir}/testrb2
 
 %check
-pushd .%{geminstdir}
+pushd .%{gem_instdir}
 #rake test --trace
 ruby -Ilib ./test/run-test.rb
 popd
 
 %files
 %defattr(-,root,root,-)
-%dir	%{geminstdir}
-%doc	%{geminstdir}/[A-Z]*
-%exclude	%{geminstdir}/Rakefile
+%dir	%{gem_instdir}
+%doc	%{gem_instdir}/[A-Z]*
+%exclude	%{gem_instdir}/Rakefile
 
 %{_bindir}/testrb2
-%{geminstdir}/bin/
-%{geminstdir}/lib/
+%{gem_instdir}/lib/
 
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%exclude	%{gem_cache}
+%{gem_spec}
 
 %files	doc
 %defattr(-,root,root,-)
-%{geminstdir}/Rakefile
-%{geminstdir}/sample/
-%{geminstdir}/test/
+# Keep below for this package
+%{gem_instdir}/Rakefile
+%{gem_instdir}/sample/
+%{gem_instdir}/test/
 
-%{gemdir}/doc/%{gemname}-%{version}/
+%{gem_dir}/doc/%{gem_name}-%{version}/
 
 %changelog
+* Wed Jan  3 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 2.5.3-1
+- 2.5.3
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.5-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index 4b9ab33..afa11fb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e54fb637d6796486e5c5fb0d6f6f9ccf  test-unit-2.4.5.gem
+fa494387a1c0c3eb742be5518ebf4a8b  test-unit-2.5.3.gem


More information about the scm-commits mailing list