]> git.pld-linux.org Git - packages/ruby-ohai.git/commitdiff
different way of writing .gemspec
authorElan Ruusamäe <glen@delfi.ee>
Wed, 1 Jun 2016 20:07:59 +0000 (23:07 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 1 Jun 2016 20:08:01 +0000 (23:08 +0300)
ruby-ohai.spec

index 8bd5baf019dd8244fbda1ffa71bcc7adf62bc7be..bb7fd2de95bb94cb0f9a63f8aee6f10ac0f6c445 100644 (file)
@@ -80,13 +80,15 @@ This package contains documentation for %{name}.
 rm spec/unit/plugins/darwin/system_profiler_spec.rb
 
 # can't figure how to fix -r rubygems does not help
-# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized cons tant Gem (NameError)
+# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized constant Gem (NameError)
 rm spec/unit/plugins/ruby_spec.rb
 
 %build
-rake -Ilib gem
-%{__tar} -xmf pkg/ohai-%{version}*.gem
-%__gem_helper spec
+# make gemspec self-contained
+ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
+       File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
+       file.puts spec.to_ruby_for_cache
+end'
 
 %if %{with tests}
 # Occasionally fails with "undefined method `rfc2822' for nil:NilClass" during
This page took 0.081818 seconds and 4 git commands to generate.