]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - ruby.spec
ruby: sample how to write self-contained gemspec
[projects/template-specs.git] / ruby.spec
index 849048531c2948be246fb1068c2ad63938e79081..363df345efd17ded0aae2e90394b1fa86beb8cd3 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -73,6 +73,12 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 # write .gemspec
 %__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 old
 cp %{_datadir}/setup.rb .
 %{__ruby} setup.rb config \
This page took 0.104007 seconds and 4 git commands to generate.