forked from pool/rubygem-gem2rpm
Accepting request 173615 from devel:languages:ruby:extensions
- support ruby 2.0 - update to 0.9.2 - no changelog - fix redirection in gem2rpm-opensuse OBS-URL: https://build.opensuse.org/request/show/173615 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=5
This commit is contained in:
parent
65d234e753
commit
6e4bb122b9
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5fd5d6bd2e1c65d97b295f74def07448212d9227e2149adff39f839ba212bf7
|
||||
size 12800
|
3
gem2rpm-0.9.2.gem
Normal file
3
gem2rpm-0.9.2.gem
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b2529e2e2091f2746fd426722bf0da459b7257d4c4a9fa3dfa81e3532b96498
|
||||
size 13312
|
@ -1,7 +1,7 @@
|
||||
diff -ru gem2rpm-0.8.4.orig/bin/gem2rpm gem2rpm-0.8.4/bin/gem2rpm
|
||||
--- gem2rpm-0.8.4.orig/bin/gem2rpm 2013-03-18 14:10:53.897635829 +0100
|
||||
+++ gem2rpm-0.8.4/bin/gem2rpm 2013-03-18 14:11:06.853676714 +0100
|
||||
@@ -122,9 +122,15 @@
|
||||
diff -ru gem2rpm-0.9.2.orig/bin/gem2rpm gem2rpm-0.9.2/bin/gem2rpm
|
||||
--- gem2rpm-0.9.2.orig/bin/gem2rpm 2013-04-27 18:05:35.507339324 +0200
|
||||
+++ gem2rpm-0.9.2/bin/gem2rpm 2013-04-27 18:06:04.661974841 +0200
|
||||
@@ -121,9 +121,15 @@
|
||||
if output_file.nil?
|
||||
Gem2Rpm::convert(gemfile, template, $stdout, nongem, local, doc_subpackage) unless deps
|
||||
else
|
||||
@ -18,10 +18,10 @@ diff -ru gem2rpm-0.8.4.orig/bin/gem2rpm gem2rpm-0.8.4/bin/gem2rpm
|
||||
ensure
|
||||
out.close()
|
||||
end
|
||||
Nur in gem2rpm-0.8.4/bin: gem2rpm.orig.
|
||||
diff -ru gem2rpm-0.8.4.orig/lib/gem2rpm/specification.rb gem2rpm-0.8.4/lib/gem2rpm/specification.rb
|
||||
--- gem2rpm-0.8.4.orig/lib/gem2rpm/specification.rb 2013-03-18 14:10:53.897635829 +0100
|
||||
+++ gem2rpm-0.8.4/lib/gem2rpm/specification.rb 2013-03-18 14:11:06.852676700 +0100
|
||||
Only in gem2rpm-0.9.2/bin: gem2rpm.orig
|
||||
diff -ru gem2rpm-0.9.2.orig/lib/gem2rpm/specification.rb gem2rpm-0.9.2/lib/gem2rpm/specification.rb
|
||||
--- gem2rpm-0.9.2.orig/lib/gem2rpm/specification.rb 2013-04-27 18:05:35.561338649 +0200
|
||||
+++ gem2rpm-0.9.2/lib/gem2rpm/specification.rb 2013-04-27 18:06:04.661974841 +0200
|
||||
@@ -6,7 +6,11 @@
|
||||
class Specification < SimpleDelegator
|
||||
# A long description of gem wrapped to 78 characters.
|
||||
@ -53,28 +53,31 @@ diff -ru gem2rpm-0.8.4.orig/lib/gem2rpm/specification.rb gem2rpm-0.8.4/lib/gem2r
|
||||
# List of dependencies that are used for development.
|
||||
def development_dependencies
|
||||
super.map {|d| Gem2Rpm::Dependency.new d}
|
||||
diff -ru gem2rpm-0.8.4.orig/lib/gem2rpm.rb gem2rpm-0.8.4/lib/gem2rpm.rb
|
||||
--- gem2rpm-0.8.4.orig/lib/gem2rpm.rb 2013-03-18 14:10:53.897635829 +0100
|
||||
+++ gem2rpm-0.8.4/lib/gem2rpm.rb 2013-03-18 14:11:06.853676714 +0100
|
||||
@@ -35,11 +35,13 @@
|
||||
diff -ru gem2rpm-0.9.2.orig/lib/gem2rpm.rb gem2rpm-0.9.2/lib/gem2rpm.rb
|
||||
--- gem2rpm-0.9.2.orig/lib/gem2rpm.rb 2013-04-27 18:05:35.507339324 +0200
|
||||
+++ gem2rpm-0.9.2/lib/gem2rpm.rb 2013-04-27 18:08:10.485401832 +0200
|
||||
@@ -31,11 +31,14 @@
|
||||
end
|
||||
|
||||
def Gem2Rpm.convert(fname, template=TEMPLATE, out=$stdout,
|
||||
- nongem=true, local=false, doc_subpackage = true)
|
||||
+ nongem=true, local=false, doc_subpackage = true, oldlicense=nil)
|
||||
format = Gem::Format.from_file_by_path(fname)
|
||||
spec = Gem2Rpm::Specification.new(format.spec)
|
||||
package = Gem2Rpm::Package.new(fname)
|
||||
format = Gem2Rpm::Format.new(package)
|
||||
spec = Gem2Rpm::Specification.new(package.spec)
|
||||
- spec.description ||= spec.summary
|
||||
download_path = ""
|
||||
+ #spec.description ||= spec.summary
|
||||
+ if spec.licenses.empty? && oldlicense
|
||||
+ spec.licenses = oldlicense.split(' and ')
|
||||
+ end
|
||||
download_path = ""
|
||||
unless local
|
||||
begin
|
||||
download_path = find_download_url(spec.name, spec.version)
|
||||
diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/opensuse.spec.erb
|
||||
--- gem2rpm-0.8.4.orig/templates/opensuse.spec.erb 2013-03-18 14:10:53.897635829 +0100
|
||||
+++ gem2rpm-0.8.4/templates/opensuse.spec.erb 2013-03-18 14:11:53.478824020 +0100
|
||||
Only in gem2rpm-0.9.2/lib: gem2rpm.rb.orig
|
||||
Only in gem2rpm-0.9.2/lib: gem2rpm.rb.rej
|
||||
diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/opensuse.spec.erb
|
||||
--- gem2rpm-0.9.2.orig/templates/opensuse.spec.erb 2013-04-27 18:05:35.561338649 +0200
|
||||
+++ gem2rpm-0.9.2/templates/opensuse.spec.erb 2013-04-28 09:10:52.287772175 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
-# spec file for package rubygem-<%= spec.name %> (Version <%= spec.version %>)
|
||||
@ -85,7 +88,7 @@ diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,58 +15,106 @@
|
||||
@@ -15,58 +15,142 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
@ -115,9 +118,9 @@ diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/
|
||||
+<% unless req.empty? -%>
|
||||
+Requires: ruby <%= req %>
|
||||
+BuildRequires: ruby-devel <%= req %>
|
||||
+<% end -%>
|
||||
<% end -%>
|
||||
-<% for d in spec.dependencies -%>
|
||||
+<% end -%>
|
||||
+<% for d in spec.runtime_dependencies -%>
|
||||
+<% if ['rdoc'].include? d.name.to_s -%>
|
||||
+# <%= d.name %> <%= d.__getobj__().requirement %>
|
||||
@ -146,6 +149,11 @@ diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/
|
||||
+License: CHECK(Ruby)
|
||||
+<% end -%>
|
||||
+Group: Development/Languages/Ruby
|
||||
+<% unless spec.executables.empty? -%>
|
||||
+%define mod_branch -%{version}
|
||||
+%define mod_weight <%= spec.version.to_s.split('.')[0] %>
|
||||
+PreReq: update-alternatives
|
||||
+<% end -%>
|
||||
+
|
||||
%description
|
||||
-<%= spec.description %>
|
||||
@ -156,13 +164,24 @@ diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/
|
||||
+Summary: RDoc documentation for %{mod_name}
|
||||
+Group: Development/Languages/Ruby
|
||||
+Requires: %{name} = %{version}
|
||||
+
|
||||
|
||||
+%description doc
|
||||
+Documentation generated at gem installation time.
|
||||
+Usually in RDoc and RI formats.
|
||||
|
||||
+
|
||||
+<% end -%>
|
||||
+<% test_frameworks = %w(test spec).select { |framework| format.file_entries.any? { |entry, data| path = entry['path'] ; path.index(framework + "/") == 0 } } -%>
|
||||
+<% test_frameworks = %w(test spec).select do |framework|
|
||||
+ format.file_entries.any? do |entry|
|
||||
+ # new rubygems version has it different
|
||||
+ if entry.kind_of?(Array)
|
||||
+ path=entry[0]['path']
|
||||
+ else
|
||||
+ path=entry
|
||||
+ end
|
||||
+ path.index(framework + "/") == 0
|
||||
+ end
|
||||
+ end
|
||||
+-%>
|
||||
+<% unless test_frameworks.empty? -%>
|
||||
+%package testsuite
|
||||
+Summary: Test suite for %{mod_name}
|
||||
@ -187,21 +206,41 @@ diff -ru gem2rpm-0.8.4.orig/templates/opensuse.spec.erb gem2rpm-0.8.4/templates/
|
||||
+<% unless spec.extensions.empty? -%>
|
||||
%gem_cleanup
|
||||
-<% end %>
|
||||
-
|
||||
+<% end -%>
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+mv %{buildroot}%{_bindir}/<%= executable %>{,%{mod_branch}}
|
||||
+ln -s <%= executable %>%{mod_branch} %{buildroot}%{_bindir}/<%= executable %>
|
||||
+<%end -%>
|
||||
+<% unless spec.executables.empty? -%>
|
||||
+
|
||||
+%post
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+/usr/sbin/update-alternatives --install \
|
||||
+ %{_bindir}/<%= executable %> <%= executable %> %{_bindir}/<%= executable %>%{mod_branch} %{mod_weight}
|
||||
+<% end -%>
|
||||
|
||||
-%clean
|
||||
-%{__rm} -rf %{buildroot}
|
||||
+%preun
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+if [ "$1" = 0 ] ; then
|
||||
+ /usr/sbin/update-alternatives --remove <%= executable %> %{_bindir}/<%= executable %>%{mod_branch}
|
||||
+fi
|
||||
+<% end -%>
|
||||
+<% end -%>
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
-<% spec.executables.each do |executable| %>
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
%{_bindir}/<%= executable %>
|
||||
-%{_bindir}/<%= executable %>
|
||||
-<% end %>
|
||||
-%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_name}-%{version}.gem
|
||||
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
|
||||
-%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_name}-%{version}.gemspec
|
||||
-%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_name}-%{version}/
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+%{_bindir}/<%= executable %>%{mod_branch}
|
||||
+%ghost %{_bindir}/<%= executable %>
|
||||
+<% end -%>
|
||||
+%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
|
||||
+%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "obsolete, gem2rpm knows it's running on opensuse" > &2
|
||||
echo "obsolete, gem2rpm knows it's running on opensuse" >&2
|
||||
exec gem2rpm -t opensuse $1
|
||||
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 28 06:55:08 UTC 2013 - coolo@suse.com
|
||||
|
||||
- support ruby 2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 27 16:09:07 UTC 2013 - coolo@suse.com
|
||||
|
||||
- update to 0.9.2 - no changelog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 22 19:03:01 UTC 2013 - mrueckert@suse.de
|
||||
|
||||
- fix redirection in gem2rpm-opensuse
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 18 13:04:43 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: rubygem-gem2rpm
|
||||
Version: 0.8.4
|
||||
Version: 0.9.2
|
||||
Release: 0
|
||||
%define mod_name gem2rpm
|
||||
%define mod_full_name %{mod_name}-%{version}
|
||||
@ -34,6 +34,9 @@ Patch1: gem2rpm-change-default-template.diff
|
||||
Summary: Generate rpm specfiles from gems
|
||||
License: GPL-2.0+
|
||||
Group: Development/Languages/Ruby
|
||||
%define mod_branch -%{version}
|
||||
%define mod_weight 9
|
||||
PreReq: update-alternatives
|
||||
|
||||
%description
|
||||
Generate source rpms and rpm spec files from a Ruby Gem.
|
||||
@ -57,12 +60,24 @@ Usually in RDoc and RI formats.
|
||||
%gem_build
|
||||
|
||||
%install
|
||||
%gem_install
|
||||
%gem_install -f
|
||||
%{__install} -D -m 0755 %{S:2} %{buildroot}%{_bindir}/gem2rpm-opensuse
|
||||
mv %{buildroot}%{_bindir}/gem2rpm{,%{mod_branch}}
|
||||
ln -s gem2rpm%{mod_branch} %{buildroot}%{_bindir}/gem2rpm
|
||||
|
||||
%post
|
||||
/usr/sbin/update-alternatives --install \
|
||||
%{_bindir}/gem2rpm gem2rpm %{_bindir}/gem2rpm%{mod_branch} %{mod_weight}
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove gem2rpm %{_bindir}/gem2rpm%{mod_branch}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/gem2rpm
|
||||
%{_bindir}/gem2rpm%{mod_branch}
|
||||
%ghost %{_bindir}/gem2rpm
|
||||
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
|
||||
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
|
||||
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec
|
||||
|
Loading…
Reference in New Issue
Block a user