gem2rpm 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/bin/gem2rpm +20 -7
- data/lib/gem2rpm.rb +9 -6
- data/lib/gem2rpm/template.rb +5 -4
- data/templates/fedora-21-rawhide-vagrant-plugin.spec.erb +0 -3
- metadata +4 -26
- checksums.yaml.gz.sig +0 -3
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05c2d7ff2784e6acf91598c7eb14826f9b6e131c
|
4
|
+
data.tar.gz: dd82ef52cba6f90b6f27659345b4a5aa40c92b8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 233cfde605cf890876d4fba199ff1c1d23ffd34d683af16146406594dbf443f683961a7294310787924685c687650f7fd0aaaf7f82faa5d25602f5e4c2f25125
|
7
|
+
data.tar.gz: 52cd2e8b0fcece311b18f79b61c928829adc88b95144cbbd61ea45f17fc77835305c1556d0a82d89065f6e4f045a22bc5ec119f19e8ec67923929138a58b2b3e
|
data/README.md
CHANGED
@@ -63,6 +63,12 @@ $ gem2rpm -t rubygem-GEM.spec.template > rubygem-GEM.spec
|
|
63
63
|
|
64
64
|
With this new template you can now build your RPM as usual and when a new version of the gem becomes available, you just edit the saved template and rerun gem2rpm over it.
|
65
65
|
|
66
|
+
To see all available templates that are shipped and can be directly used with gem2rpm run:
|
67
|
+
|
68
|
+
```
|
69
|
+
$ gem2rpm --templates
|
70
|
+
```
|
71
|
+
|
66
72
|
## Templates
|
67
73
|
|
68
74
|
The template is a standard ERB file that comes with three main variables:
|
data/bin/gem2rpm
CHANGED
@@ -10,9 +10,9 @@ require 'open-uri'
|
|
10
10
|
require 'uri'
|
11
11
|
|
12
12
|
opts = OptionParser.new("Usage: #{$0} [OPTIONS] GEM")
|
13
|
-
opts.separator(" Convert
|
13
|
+
opts.separator(" Convert Ruby gems to source RPMs and specfiles.")
|
14
14
|
opts.separator(" Uses a template to generate the RPM specfile")
|
15
|
-
opts.separator(" from the
|
15
|
+
opts.separator(" from the gem specification.")
|
16
16
|
|
17
17
|
print_template_file = nil
|
18
18
|
template_file = nil
|
@@ -32,6 +32,13 @@ end
|
|
32
32
|
opts.on("-t", "--template TEMPLATE", "Use TEMPLATE for the specfile") do |val|
|
33
33
|
template_file = val
|
34
34
|
end
|
35
|
+
opts.on("--templates", "List all available templates") do
|
36
|
+
puts "Available templates in #{Gem2Rpm::Template.default_location}:\n\n"
|
37
|
+
puts Gem2Rpm::Template.list.map{
|
38
|
+
|t| t.gsub(/(.*)\.spec.erb/, '\\1')
|
39
|
+
}.join("\n")
|
40
|
+
exit 0
|
41
|
+
end
|
35
42
|
opts.on("-v", "--version", "Print gem2rpm's version and exit") do
|
36
43
|
puts Gem2Rpm::VERSION
|
37
44
|
exit 0
|
@@ -60,16 +67,22 @@ opts.on("--fetch", "Fetch the gem from rubygems.org") do |val|
|
|
60
67
|
end
|
61
68
|
opts.separator("")
|
62
69
|
opts.separator(" Arguments:")
|
63
|
-
opts.separator(" GEM
|
70
|
+
opts.separator(" GEM The path to the locally stored gem package file or the name")
|
64
71
|
opts.separator(" of the gem when using --fetch.")
|
65
72
|
opts.separator("")
|
66
73
|
|
67
|
-
|
74
|
+
begin
|
75
|
+
rest = opts.permute(ARGV)
|
76
|
+
rescue OptionParser::InvalidOption => e
|
77
|
+
$stderr.puts "#{e}\n\n"
|
78
|
+
$stderr.puts opts
|
79
|
+
exit(1)
|
80
|
+
end
|
68
81
|
|
69
82
|
template = begin
|
70
83
|
Gem2Rpm::Template.find template_file, :gem_file => rest[0]
|
71
|
-
rescue Gem2Rpm::Template::TemplateError
|
72
|
-
$stderr.puts
|
84
|
+
rescue Gem2Rpm::Template::TemplateError => e
|
85
|
+
$stderr.puts e
|
73
86
|
exit(1)
|
74
87
|
end
|
75
88
|
|
@@ -79,7 +92,7 @@ if print_template_file
|
|
79
92
|
end
|
80
93
|
|
81
94
|
if rest.size != 1
|
82
|
-
$stderr.puts "Missing GEMFILE"
|
95
|
+
$stderr.puts "Missing GEMFILE\n\n"
|
83
96
|
$stderr.puts opts
|
84
97
|
exit(1)
|
85
98
|
end
|
data/lib/gem2rpm.rb
CHANGED
@@ -11,7 +11,7 @@ require 'gem2rpm/template'
|
|
11
11
|
module Gem2Rpm
|
12
12
|
extend Gem2Rpm::TemplateHelpers
|
13
13
|
|
14
|
-
Gem2Rpm::VERSION = "0.11.
|
14
|
+
Gem2Rpm::VERSION = "0.11.2"
|
15
15
|
|
16
16
|
class Exception < RuntimeError; end
|
17
17
|
class DownloadUrlError < Exception; end
|
@@ -41,8 +41,8 @@ module Gem2Rpm
|
|
41
41
|
download_path
|
42
42
|
end
|
43
43
|
|
44
|
-
def Gem2Rpm.convert(fname, template
|
45
|
-
|
44
|
+
def Gem2Rpm.convert(fname, template, out=$stdout, nongem=true, local=false,
|
45
|
+
doc_subpackage = true)
|
46
46
|
package = Gem2Rpm::Package.new(fname)
|
47
47
|
# Deprecate, kept just for backward compatibility.
|
48
48
|
format = Gem2Rpm::Format.new(package)
|
@@ -82,10 +82,13 @@ module Gem2Rpm
|
|
82
82
|
packager
|
83
83
|
end
|
84
84
|
|
85
|
-
|
86
|
-
|
85
|
+
def self.rubygem_template
|
86
|
+
Template.new(File.join(Template::default_location, "#{Distro.nature.to_s}.spec.erb"))
|
87
|
+
end
|
88
|
+
|
89
|
+
def self.vagrant_plugin_template
|
87
90
|
file = File.join(Template::default_location, "#{Distro.nature.to_s}-vagrant-plugin.spec.erb")
|
88
|
-
Template.new(file)
|
91
|
+
Template.new(file)
|
89
92
|
end
|
90
93
|
|
91
94
|
end
|
data/lib/gem2rpm/template.rb
CHANGED
@@ -25,15 +25,16 @@ module Gem2Rpm
|
|
25
25
|
# when looking for vagrant templates for example.
|
26
26
|
def self.find(name = nil, options = {})
|
27
27
|
if name.nil?
|
28
|
-
|
28
|
+
gem_file = File.basename(options[:gem_file]) if options[:gem_file]
|
29
|
+
case gem_file
|
29
30
|
when /^vagrant(-|_).*/
|
30
|
-
Gem2Rpm
|
31
|
+
Gem2Rpm.vagrant_plugin_template
|
31
32
|
else
|
32
|
-
Gem2Rpm
|
33
|
+
Gem2Rpm.rubygem_template
|
33
34
|
end
|
34
35
|
else
|
35
36
|
begin
|
36
|
-
|
37
|
+
if File.exists?(name)
|
37
38
|
Gem2Rpm::Template.new(name)
|
38
39
|
else
|
39
40
|
Gem2Rpm::Template.new(File.join(Gem2Rpm::Template::default_location, name + '.spec.erb'))
|
@@ -14,9 +14,6 @@ Source0: <%= download_path %>%{vagrant_plugin_name}-%{version}.gem
|
|
14
14
|
Requires(posttrans): vagrant
|
15
15
|
Requires(preun): vagrant
|
16
16
|
Requires: vagrant
|
17
|
-
BuildRequires: ruby(release)
|
18
|
-
BuildRequires: rubygems-devel
|
19
|
-
BuildRequires: ruby
|
20
17
|
BuildRequires: vagrant
|
21
18
|
<% if spec.extensions.empty? -%>
|
22
19
|
BuildArch: noarch
|
metadata
CHANGED
@@ -1,37 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem2rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lutterkort
|
8
8
|
- Vit Ondruch
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
-
|
13
|
-
-----BEGIN CERTIFICATE-----
|
14
|
-
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRIwEAYDVQQDDAl2Lm9u
|
15
|
-
ZHJ1Y2gxFzAVBgoJkiaJk/IsZAEZFgd0aXNjYWxpMRIwEAYKCZImiZPyLGQBGRYC
|
16
|
-
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yjY/fJWmceetOyax4e+5xjZ9fKEik
|
31
|
-
YpMJ590rUNfDhbfYuAY0l6VDmajngEKkdxCEP0v6KBQeOmH3/+oOxcSVnc3NAp2J
|
32
|
-
eE+DjyUv9Cq0yBFpfdrGk1fHwX/dtWcFrsKNxw==
|
33
|
-
-----END CERTIFICATE-----
|
34
|
-
date: 2015-05-06 00:00:00.000000000 Z
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
35
13
|
dependencies: []
|
36
14
|
description: |2
|
37
15
|
Generate source rpms and rpm spec files from a Ruby Gem.
|
@@ -88,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
66
|
version: '0'
|
89
67
|
requirements: []
|
90
68
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
69
|
+
rubygems_version: 2.4.8
|
92
70
|
signing_key:
|
93
71
|
specification_version: 4
|
94
72
|
summary: Generate rpm specfiles from gems
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED