gem2rpm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/gem2rpm.rb +1 -1
- data/lib/gem2rpm/configuration.rb +3 -1
- data/templates/{fedora-26-rawhide-vagrant-plugin.spec.erb → fedora-26-vagrant-plugin.spec.erb} +1 -1
- data/templates/{fedora-26-rawhide.spec.erb → fedora-26.spec.erb} +1 -1
- data/templates/fedora-27-rawhide-vagrant-plugin.spec.erb +108 -0
- data/templates/fedora-27-rawhide.spec.erb +115 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5ef185b58bdc8a209237f215045af408af7bedaa2402ade90ddfdf114d40b04e
|
4
|
+
data.tar.gz: 86431c8cd7bab0b06263d6be7367822c50bab04b3d433616d84340d00134c83e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bb872a9d0da7cfcaafaaae6bc54b554d299f2ac3348e945503b0355b468b3bdcc7019292b035031d124dc28a2ca2eddd0ea2165caeb2787e0806d47c7ab9b84
|
7
|
+
data.tar.gz: 1148d5a82c43bec26fd16b217109ef2bf7c7f86289f3b2926f7a8582092f817c88de727bf310cfc12d3b1a5f12b2ec933030a2f8d70037e19d6c8f2572c8b9f8
|
data/lib/gem2rpm.rb
CHANGED
@@ -55,12 +55,13 @@ module Gem2Rpm
|
|
55
55
|
'.gemtest',
|
56
56
|
'.gitignore',
|
57
57
|
'.travis.yml',
|
58
|
+
'.hound.yml',
|
58
59
|
'.yardopts',
|
59
60
|
'.rspec',
|
60
61
|
'.rvmrc',
|
61
62
|
'.rubocop.yml',
|
63
|
+
'.rubocop_todo.yml',
|
62
64
|
/^\..*rc$/i,
|
63
|
-
/\/?.*\.gemspec$/,
|
64
65
|
],
|
65
66
|
:test => [
|
66
67
|
'.rspec',
|
@@ -77,6 +78,7 @@ module Gem2Rpm
|
|
77
78
|
'rakefile.rb',
|
78
79
|
'Vagrantfile',
|
79
80
|
/^examples.*/,
|
81
|
+
/\/?.*\.gemspec$/,
|
80
82
|
]
|
81
83
|
}.freeze
|
82
84
|
|
data/templates/{fedora-26-rawhide-vagrant-plugin.spec.erb → fedora-26-vagrant-plugin.spec.erb}
RENAMED
@@ -62,7 +62,7 @@ rm -rf %{buildroot}%{vagrant_plugin_instdir}/<%= ext.split(File::SEPARATOR).firs
|
|
62
62
|
|
63
63
|
<% unless spec.executables.empty? -%>
|
64
64
|
mkdir -p %{buildroot}%{_bindir}
|
65
|
-
cp -
|
65
|
+
cp -a .%{_bindir}/* \
|
66
66
|
%{buildroot}%{_bindir}/
|
67
67
|
|
68
68
|
find %{buildroot}%{vagrant_plugin_instdir}/<%= spec.bindir %> -type f | xargs chmod a+x
|
@@ -74,7 +74,7 @@ rm -rf %{buildroot}%{gem_instdir}/<%= ext.split(File::SEPARATOR).first %>/
|
|
74
74
|
|
75
75
|
<% unless spec.executables.empty? -%>
|
76
76
|
mkdir -p %{buildroot}%{_bindir}
|
77
|
-
cp -
|
77
|
+
cp -a .%{_bindir}/* \
|
78
78
|
%{buildroot}%{_bindir}/
|
79
79
|
|
80
80
|
find %{buildroot}%{gem_instdir}/<%= spec.bindir %> -type f | xargs chmod a+x
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# Generated from <%= spec.file_name %> by gem2rpm -*- rpm-spec -*-
|
2
|
+
%global vagrant_plugin_name <%= spec.name %>
|
3
|
+
|
4
|
+
Name: %{vagrant_plugin_name}
|
5
|
+
Version: <%= spec.version %>
|
6
|
+
Release: 1%{?dist}
|
7
|
+
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
8
|
+
License: <%= spec.licenses.join(" and ") %>
|
9
|
+
<% if spec.homepage -%>
|
10
|
+
URL: <%= spec.homepage %>
|
11
|
+
<% end -%>
|
12
|
+
Source0: <%= download_path %>%{vagrant_plugin_name}-%{version}.gem
|
13
|
+
Requires: vagrant
|
14
|
+
BuildRequires: vagrant
|
15
|
+
<% if spec.extensions.empty? -%>
|
16
|
+
BuildArch: noarch
|
17
|
+
<% end -%>
|
18
|
+
Provides: vagrant(%{vagrant_plugin_name}) = %{version}
|
19
|
+
|
20
|
+
%description
|
21
|
+
<%= spec.description %>
|
22
|
+
|
23
|
+
<% if doc_subpackage -%>
|
24
|
+
%package doc
|
25
|
+
Summary: Documentation for %{name}
|
26
|
+
Requires: %{name} = %{version}-%{release}
|
27
|
+
BuildArch: noarch
|
28
|
+
|
29
|
+
%description doc
|
30
|
+
Documentation for %{name}.
|
31
|
+
<% end # if doc_subpackage -%>
|
32
|
+
|
33
|
+
%prep
|
34
|
+
%setup -q -n %{vagrant_plugin_name}-%{version}
|
35
|
+
|
36
|
+
%build
|
37
|
+
# Create the gem as gem install only works on a gem file
|
38
|
+
gem build ../%{vagrant_plugin_name}-%{version}.gemspec
|
39
|
+
|
40
|
+
# %%vagrant_plugin_install compiles any C extensions and installs the gem into ./%%gem_dir
|
41
|
+
# by default, so that we can move it into the buildroot in %%install
|
42
|
+
%vagrant_plugin_install
|
43
|
+
|
44
|
+
%install
|
45
|
+
mkdir -p %{buildroot}%{vagrant_plugin_dir}
|
46
|
+
cp -a .%{vagrant_plugin_dir}/* \
|
47
|
+
%{buildroot}%{vagrant_plugin_dir}/
|
48
|
+
|
49
|
+
<% unless spec.extensions.empty? -%>
|
50
|
+
mkdir -p %{buildroot}%{vagrant_plugin_extdir_mri}
|
51
|
+
cp -a .%{vagrant_plugin_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{vagrant_plugin_extdir_mri}/
|
52
|
+
|
53
|
+
<% for ext in spec.extensions -%>
|
54
|
+
# Prevent dangling symlink in -debuginfo (rhbz#878863).
|
55
|
+
rm -rf %{buildroot}%{vagrant_plugin_instdir}/<%= ext.split(File::SEPARATOR).first %>/
|
56
|
+
<% end -%>
|
57
|
+
<% end -%>
|
58
|
+
|
59
|
+
<% unless spec.executables.empty? -%>
|
60
|
+
mkdir -p %{buildroot}%{_bindir}
|
61
|
+
cp -a .%{_bindir}/* \
|
62
|
+
%{buildroot}%{_bindir}/
|
63
|
+
|
64
|
+
find %{buildroot}%{vagrant_plugin_instdir}/<%= spec.bindir %> -type f | xargs chmod a+x
|
65
|
+
<% end -%>
|
66
|
+
|
67
|
+
%check
|
68
|
+
pushd .%{gem_instdir}
|
69
|
+
<% if tests.entries.empty? -%>
|
70
|
+
# Run the test suite.
|
71
|
+
<% end -%>
|
72
|
+
<% for t in tests -%>
|
73
|
+
# <%= t.command %>
|
74
|
+
<% end -%>
|
75
|
+
popd
|
76
|
+
|
77
|
+
<%
|
78
|
+
# Change macros for Vagrant packaging
|
79
|
+
config.macros[:instdir] = '%{vagrant_plugin_instdir}'
|
80
|
+
config.macros[:libdir] = '%{vagrant_plugin_libdir}'
|
81
|
+
-%>
|
82
|
+
%files
|
83
|
+
%dir %{vagrant_plugin_instdir}
|
84
|
+
<% for f in spec.executables -%>
|
85
|
+
%{_bindir}/<%= f %>
|
86
|
+
<% end -%>
|
87
|
+
<% unless spec.extensions.empty? -%>
|
88
|
+
%{vagrant_plugin_extdir_mri}
|
89
|
+
<% end -%>
|
90
|
+
<%= main_files.reject do |item|
|
91
|
+
spec.extensions.detect { |extension| item =~ /^#{extension.split(File::SEPARATOR).first}$/}
|
92
|
+
end.to_rpm %>
|
93
|
+
<% unless doc_subpackage -%>
|
94
|
+
%doc %{vagrant_plugin_docdir}
|
95
|
+
<%= doc_files.to_rpm %>
|
96
|
+
<% end -%>
|
97
|
+
%exclude %{vagrant_plugin_cache}
|
98
|
+
%{vagrant_plugin_spec}
|
99
|
+
|
100
|
+
<% if doc_subpackage -%>
|
101
|
+
%files doc
|
102
|
+
%doc %{vagrant_plugin_docdir}
|
103
|
+
<%= files.top_level_entries.doc_entries.to_rpm %>
|
104
|
+
<% end # if doc_subpackage -%>
|
105
|
+
|
106
|
+
%changelog
|
107
|
+
* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1
|
108
|
+
- Initial package
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# Generated from <%= spec.file_name %> by gem2rpm -*- rpm-spec -*-
|
2
|
+
%global gem_name <%= spec.name %>
|
3
|
+
|
4
|
+
Name: rubygem-%{gem_name}
|
5
|
+
Version: <%= spec.version %>
|
6
|
+
Release: 1%{?dist}
|
7
|
+
Summary: <%= spec.summary.gsub(/\.$/, "") %>
|
8
|
+
License: <%= spec.licenses.join(" and ") %>
|
9
|
+
<% if spec.homepage -%>
|
10
|
+
URL: <%= spec.homepage %>
|
11
|
+
<% end -%>
|
12
|
+
Source0: <%= download_path %>%{gem_name}-%{version}.gem
|
13
|
+
BuildRequires: ruby(release)
|
14
|
+
<% for req in spec.required_rubygems_version -%>
|
15
|
+
BuildRequires: <%= requirement 'rubygems-devel', req %>
|
16
|
+
<% end -%>
|
17
|
+
<% for req in spec.required_ruby_version -%>
|
18
|
+
BuildRequires: <%= requirement "ruby#{'-devel' unless spec.extensions.empty?}", req %>
|
19
|
+
<% end -%>
|
20
|
+
<% unless spec.extensions.empty? -%>
|
21
|
+
# Compiler is required for build of gem binary extension.
|
22
|
+
# https://fedoraproject.org/wiki/Packaging:C_and_C++#BuildRequires_and_Requires
|
23
|
+
BuildRequires: gcc
|
24
|
+
<% end -%>
|
25
|
+
<%= development_dependencies.reject do |d|
|
26
|
+
["rdoc", "rake", "bundler"].include? d.name
|
27
|
+
end.virtualize.with_requires.comment_out.to_rpm -%>
|
28
|
+
<% if spec.extensions.empty? -%>
|
29
|
+
BuildArch: noarch
|
30
|
+
<% end -%>
|
31
|
+
|
32
|
+
%description
|
33
|
+
<%= spec.description %>
|
34
|
+
|
35
|
+
<% if doc_subpackage -%>
|
36
|
+
%package doc
|
37
|
+
Summary: Documentation for %{name}
|
38
|
+
Requires: %{name} = %{version}-%{release}
|
39
|
+
BuildArch: noarch
|
40
|
+
|
41
|
+
%description doc
|
42
|
+
Documentation for %{name}.
|
43
|
+
<% end # if doc_subpackage -%>
|
44
|
+
|
45
|
+
%prep
|
46
|
+
%setup -q -n %{gem_name}-%{version}
|
47
|
+
|
48
|
+
%build
|
49
|
+
# Create the gem as gem install only works on a gem file
|
50
|
+
gem build ../%{gem_name}-%{version}.gemspec
|
51
|
+
|
52
|
+
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
53
|
+
# by default, so that we can move it into the buildroot in %%install
|
54
|
+
%gem_install
|
55
|
+
|
56
|
+
%install
|
57
|
+
mkdir -p %{buildroot}%{gem_dir}
|
58
|
+
cp -a .%{gem_dir}/* \
|
59
|
+
%{buildroot}%{gem_dir}/
|
60
|
+
|
61
|
+
<% unless spec.extensions.empty? -%>
|
62
|
+
mkdir -p %{buildroot}%{gem_extdir_mri}
|
63
|
+
cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
|
64
|
+
|
65
|
+
<% for ext in spec.extensions -%>
|
66
|
+
# Prevent dangling symlink in -debuginfo (rhbz#878863).
|
67
|
+
rm -rf %{buildroot}%{gem_instdir}/<%= ext.split(File::SEPARATOR).first %>/
|
68
|
+
<% end -%>
|
69
|
+
<% end -%>
|
70
|
+
|
71
|
+
<% unless spec.executables.empty? -%>
|
72
|
+
mkdir -p %{buildroot}%{_bindir}
|
73
|
+
cp -a .%{_bindir}/* \
|
74
|
+
%{buildroot}%{_bindir}/
|
75
|
+
|
76
|
+
find %{buildroot}%{gem_instdir}/<%= spec.bindir %> -type f | xargs chmod a+x
|
77
|
+
<% end -%>
|
78
|
+
|
79
|
+
%check
|
80
|
+
pushd .%{gem_instdir}
|
81
|
+
<% if tests.entries.empty? -%>
|
82
|
+
# Run the test suite.
|
83
|
+
<% end -%>
|
84
|
+
<% for t in tests -%>
|
85
|
+
# <%= t.command %>
|
86
|
+
<% end -%>
|
87
|
+
popd
|
88
|
+
|
89
|
+
%files
|
90
|
+
%dir %{gem_instdir}
|
91
|
+
<% for f in spec.executables -%>
|
92
|
+
%{_bindir}/<%= f %>
|
93
|
+
<% end -%>
|
94
|
+
<% unless spec.extensions.empty? -%>
|
95
|
+
%{gem_extdir_mri}
|
96
|
+
<% end -%>
|
97
|
+
<%= main_files.reject do |item|
|
98
|
+
spec.extensions.detect { |extension| item =~ /^#{extension.split(File::SEPARATOR).first}$/}
|
99
|
+
end.to_rpm %>
|
100
|
+
<% unless doc_subpackage -%>
|
101
|
+
%doc %{gem_docdir}
|
102
|
+
<%= doc_files.to_rpm %>
|
103
|
+
<% end -%>
|
104
|
+
%exclude %{gem_cache}
|
105
|
+
%{gem_spec}
|
106
|
+
|
107
|
+
<% if doc_subpackage -%>
|
108
|
+
%files doc
|
109
|
+
%doc %{gem_docdir}
|
110
|
+
<%= doc_files.to_rpm %>
|
111
|
+
<% end # if doc_subpackage -%>
|
112
|
+
|
113
|
+
%changelog
|
114
|
+
* <%= Time.now.strftime("%a %b %d %Y") %> <%= packager %> - <%= spec.version %>-1
|
115
|
+
- Initial package
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem2rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lutterkort
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |2
|
15
15
|
Generate source rpms and rpm spec files from a Ruby Gem.
|
@@ -48,8 +48,10 @@ files:
|
|
48
48
|
- templates/fedora-19-20.spec.erb
|
49
49
|
- templates/fedora-21-25-vagrant-plugin.spec.erb
|
50
50
|
- templates/fedora-21-25.spec.erb
|
51
|
-
- templates/fedora-26-
|
52
|
-
- templates/fedora-26
|
51
|
+
- templates/fedora-26-vagrant-plugin.spec.erb
|
52
|
+
- templates/fedora-26.spec.erb
|
53
|
+
- templates/fedora-27-rawhide-vagrant-plugin.spec.erb
|
54
|
+
- templates/fedora-27-rawhide.spec.erb
|
53
55
|
- templates/fedora.spec.erb
|
54
56
|
- templates/opensuse.spec.erb
|
55
57
|
- templates/pld.spec.erb
|
@@ -73,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
75
|
version: '0'
|
74
76
|
requirements: []
|
75
77
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.6
|
78
|
+
rubygems_version: 2.7.6
|
77
79
|
signing_key:
|
78
80
|
specification_version: 4
|
79
81
|
summary: Generate rpm specfiles from gems
|