[rubygem-gem2rpm/el6] Update to gem2rpm 0.10.1.

Vít Ondruch vondruch at fedoraproject.org
Mon May 5 13:34:07 UTC 2014


commit 785b720a461d76cf3d50914bd3af6f7824c52149
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Mon May 5 13:19:14 2014 +0200

    Update to gem2rpm 0.10.1.

 .gitignore           |    2 +
 rubygem-gem2rpm.spec |   72 +++++++++++++++++++++++++++-----------------------
 sources              |    4 +-
 3 files changed, 43 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5dc510c..0401642 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ gem2rpm-0.6.0.gem
 /gem2rpm-0.9.1.gem
 /gem2rpm-0.9.2-tests.tgz
 /gem2rpm-0.9.2.gem
+/gem2rpm-0.10.1-tests.tgz
+/gem2rpm-0.10.1.gem
diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec
index ca5dffd..78eb17c 100644
--- a/rubygem-gem2rpm.spec
+++ b/rubygem-gem2rpm.spec
@@ -1,32 +1,30 @@
 # Generated from gem2rpm-0.5.2.gem by gem2rpm -*- rpm-spec -*-
-%global gemname gem2rpm
+%global gem_name gem2rpm
 
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global gemdocdir %{gemdir}/doc/%{gemname}-%{version}
 %global rubyabi 1.8
 
 Summary: Generate rpm specfiles from gems
-Name: rubygem-%{gemname}
-Version: 0.9.2
+Name: rubygem-%{gem_name}
+Version: 0.10.1
 Release: 1%{?dist}
 Group: Development/Languages
 License: GPLv2+
 URL: https://github.com/lutter/gem2rpm/
-Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
-# git clone https://github.com/lutter/gem2rpm.git && cd gem2rpm && git checkout v0.9.2
-# tar czvf gem2rpm-0.9.2-tests.tgz test/
-Source1: %{gemname}-%{version}-tests.tgz
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# git clone https://github.com/lutter/gem2rpm.git && cd gem2rpm && git checkout v0.10.1
+# tar czvf gem2rpm-0.10.1-tests.tgz test/
+Source1: %{gem_name}-%{version}-tests.tgz
 Requires: ruby(abi) = %{rubyabi}
 Requires: ruby(rubygems)
 Requires: ruby
 Requires: /usr/bin/rpmdev-packager
 BuildRequires: ruby(abi) = %{rubyabi}
-BuildRequires: ruby(rubygems)
+BuildRequires: rubygems-devel
 BuildRequires: ruby
 BuildRequires: /usr/bin/rpmdev-packager
+BuildRequires: rubygem(minitest)
 BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
+Provides: rubygem(%{gem_name}) = %{version}
 
 %description
 Generate source rpms and rpm spec files from a Ruby Gem.  The spec file
@@ -45,51 +43,59 @@ Documentation for %{name}.
 
 %prep
 %setup -q -c -T
-mkdir -p .%{gemdir}
-gem install --local --install-dir .%{gemdir} \
-            --bindir .%{_bindir} \
-            --force %{SOURCE0}
+%gem_install -n %{SOURCE0}
 
 %build
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* \
-        %{buildroot}%{gemdir}/
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
 
 mkdir -p %{buildroot}%{_bindir}
 cp -a .%{_bindir}/* \
         %{buildroot}%{_bindir}/
 
-find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
+find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
 
 %check
-pushd .%{geminstdir}
+pushd .%{gem_instdir}
 tar xzvf %{SOURCE1}
 
 # Disable this test, since it needs online access (see the comment on line 22).
-sed -i "23,25 d" test/test_gem2rpm.rb
+sed -i "/test_find_download_url_for_source_address/,/  end/ s/^/#/" test/test_gem2rpm.rb
 
-testrb -Itest test/
+ruby -Itest - << \EOF
+  require 'rubygems'
+  require 'minitest/unit'
+
+  module Minitest; end;
+
+  Minitest::Test = MiniTest::Unit::TestCase
+  Dir.glob "./test/**/test_*.rb", &method(:require)
+EOF
 popd
 
 %files
-%dir %{geminstdir}
+%dir %{gem_instdir}
 %{_bindir}/gem2rpm
-%{geminstdir}/bin
-%{geminstdir}/lib
-%{geminstdir}/templates
-%doc %{geminstdir}/LICENSE
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%{gem_instdir}/bin
+%{gem_libdir}
+%{gem_instdir}/templates
+%doc %{gem_instdir}/LICENSE
+%exclude %{gem_cache}
+%{gem_spec}
 
 %files doc
-%doc %{gemdocdir}
-%doc %{geminstdir}/README
-%doc %{geminstdir}/AUTHORS
+%doc %{gem_docdir}
+%doc %{gem_instdir}/README
+%doc %{gem_instdir}/AUTHORS
 
 %changelog
+* Mon May 05 2014 Vít Ondruch <vondruch at redhat.com> - 0.10.1-1
+- Update to gem2rpm 0.10.1.
+
 * Tue Apr 23 2013 Vít Ondruch <vondruch at redhat.com> - 0.9.2-1
 - Update to gem2rpm 0.9.2.
 
diff --git a/sources b/sources
index 2059003..43132ed 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-e5a178f7cf4aff215cfe232d8808d2e4  gem2rpm-0.9.2-tests.tgz
-6988e28332369a79067d45b8c61f2851  gem2rpm-0.9.2.gem
+7efa72436d776242f047c658acfcf3bc  gem2rpm-0.10.1-tests.tgz
+79141142a432303e0d611f75dfd20591  gem2rpm-0.10.1.gem


More information about the scm-commits mailing list