forked from pool/rubygem-gem2rpm
0e2db665e5
#hackweek8 OBS-URL: https://build.opensuse.org/request/show/129323 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=1
35 lines
1022 B
Diff
35 lines
1022 B
Diff
Index: gem2rpm-0.8.1/bin/gem2rpm
|
|
===================================================================
|
|
--- gem2rpm-0.8.1.orig/bin/gem2rpm
|
|
+++ gem2rpm-0.8.1/bin/gem2rpm
|
|
@@ -69,6 +69,16 @@ rest = opts.permute(ARGV)
|
|
|
|
template = nil
|
|
if template_file.nil?
|
|
+ f = open("/etc/os-release", "r") if File.exists?("/etc/os-release")
|
|
+ if f
|
|
+ f.read.split('\n').each do |line|
|
|
+ line.match(%r{^ID=(.*)$}) { |m| template_file=m[1] }
|
|
+ end
|
|
+ f.close
|
|
+ f = nil
|
|
+ end
|
|
+end
|
|
+if template_file.nil?
|
|
template = Gem2Rpm::TEMPLATE
|
|
else
|
|
begin
|
|
Index: gem2rpm-0.8.1/lib/gem2rpm/distro.rb
|
|
===================================================================
|
|
--- gem2rpm-0.8.1.orig/lib/gem2rpm/distro.rb
|
|
+++ gem2rpm-0.8.1/lib/gem2rpm/distro.rb
|
|
@@ -20,7 +20,7 @@ module Gem2Rpm
|
|
else # no version or more versions (=> don't know what to do)
|
|
FEDORA
|
|
end
|
|
- elsif !release_files.grep(/SuSe/).empty?
|
|
+ elsif !release_files.grep(/SuSE/).empty?
|
|
OPENSUSE
|
|
else
|
|
DEFAULT
|