mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 18:33:04 +00:00
34 lines
978 B
Diff
34 lines
978 B
Diff
![]() |
--- rpm-5.4.14/scripts/gem_helper.rb.gem_spec~ 2014-03-16 06:14:50.213542916 +0100
|
||
|
+++ rpm-5.4.14/scripts/gem_helper.rb 2014-03-16 08:22:46.196241762 +0100
|
||
|
@@ -6,8 +6,9 @@
|
||
|
#++
|
||
|
|
||
|
require 'optparse'
|
||
|
+require 'rubygems'
|
||
|
|
||
|
-if ARGV[0] == "build" or ARGV[0] == "install"
|
||
|
+if ARGV[0] == "build" or ARGV[0] == "install" or ARGV[0] == "spec"
|
||
|
require 'yaml'
|
||
|
require 'zlib'
|
||
|
|
||
|
@@ -65,9 +66,18 @@ if ARGV[0] == "build" or ARGV[0] == "ins
|
||
|
body[iv.to_s.gsub(/^@/,'')] = header.instance_variable_get(iv)
|
||
|
end
|
||
|
|
||
|
- require 'rubygems'
|
||
|
spec = Gem::Specification.from_yaml(YAML.dump(header))
|
||
|
|
||
|
+ if ARGV[0] == "spec"
|
||
|
+ # Write the .gemspec specification (in Ruby)
|
||
|
+ file_name = spec.full_name.untaint + '.gemspec'
|
||
|
+ File.open(file_name, "w") do |file|
|
||
|
+ file.puts spec.to_ruby_for_cache
|
||
|
+ end
|
||
|
+ print "Wrote: %s\n" % file_name
|
||
|
+ exit(0)
|
||
|
+ end
|
||
|
+
|
||
|
if ARGV[0] == "install"
|
||
|
system("gem %s %s.gem" % [ARGV.join(' '), spec.full_name])
|
||
|
if !keepcache
|