[packages/ruby-thor] - another way (parse + dump) to create self-contained gemspec
qboosh
qboosh at pld-linux.org
Thu Apr 17 20:48:08 CEST 2014
commit 9c796095c2453129b1bb3a60d514e1180f2e3d31
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Apr 17 20:50:11 2014 +0200
- another way (parse + dump) to create self-contained gemspec
ruby-thor.spec | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/ruby-thor.spec b/ruby-thor.spec
index 6a20b34..3f0484e 100644
--- a/ruby-thor.spec
+++ b/ruby-thor.spec
@@ -53,11 +53,12 @@ Dokumentacja w formacie ri dla pakietu thor.
%setup -q -n %{pkgname}-%{version}
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
-# make gemspec self-contained
-%{__sed} -e '2,4d' -e '5r lib/thor/version.rb' thor.gemspec > thor-%{version}.gemspec
-
%build
-%__gem_helper .
+# make gemspec self-contained
+ruby -r rubygems -e 'spec = eval(File.read("thor.gemspec"))
+ File.open("thor-%{version}.gemspec", "w") do |file|
+ file.puts spec.to_ruby_for_cache
+ end'
# UTF8 locale needed for doc generation
export LC_ALL=en_US.UTF-8
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-thor.git/commitdiff/9c796095c2453129b1bb3a60d514e1180f2e3d31
More information about the pld-cvs-commit
mailing list