1
0

Accepting request 221116 from devel:languages:ruby:extensions

- buildrequire ruby-devel for extensions

OBS-URL: https://build.opensuse.org/request/show/221116
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=12
This commit is contained in:
Tomáš Chvátal 2014-02-07 09:29:51 +00:00 committed by Git OBS Bridge
parent 52e7117419
commit 1585e1c64c
2 changed files with 17 additions and 9 deletions

View File

@ -75,7 +75,7 @@ diff -ru gem2rpm-0.9.2.orig/lib/gem2rpm.rb gem2rpm-0.9.2/lib/gem2rpm.rb
begin
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-30 13:31:08.586730796 +0200
+++ gem2rpm-0.9.2/templates/opensuse.spec.erb 2014-01-13 20:50:24.423287000 +0100
+++ gem2rpm-0.9.2/templates/opensuse.spec.erb 2014-02-06 12:50:30.021264515 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package rubygem-<%= spec.name %> (Version <%= spec.version %>)
@ -86,7 +86,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/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,181 @@
@@ -15,58 +15,184 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@ -125,10 +125,13 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
+<% for req in spec.required_ruby_version -%>
+<% unless req.empty? -%>
+Requires: ruby <%= req %>
+BuildRequires: ruby-devel <%= req %>
+BuildRequires: ruby <%= req %>
<% end -%>
-<% for d in spec.dependencies -%>
+<% end -%>
+<% unless spec.extensions.empty? -%>
+BuildRequires: ruby-devel
+<% end -%>
+<% for d in spec.runtime_dependencies -%>
+<% if ['rdoc'].include? d.name.to_s -%>
+# <%= d.name %> <%= d.__getobj__().requirement %>
@ -206,10 +209,10 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
+Summary: Test suite for %{mod_name}
+Group: Development/Languages/Ruby
+Requires: %{name} = %{version}
+
+%description testsuite
+Test::Unit or RSpec files, useful for developers.
+
+<% end -%>
%prep
+#gem_unpack
@ -233,7 +236,9 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
+mv %{buildroot}%{_bindir}/<%= executable %>{,%{mod_branch}}
+touch %{buildroot}%{_sysconfdir}/alternatives/<%= executable %>
+ln -s %{_sysconfdir}/alternatives/<%= executable %> %{buildroot}%{_bindir}/<%= executable %>
+
-%clean
-%{__rm} -rf %{buildroot}
+<% end -%>
+<% unless docdirfiles.empty? -%>
+mkdir -p %{buildroot}%{_docdir}/%{name}
@ -248,9 +253,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
+/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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 6 11:52:43 UTC 2014 - coolo@suse.com
- buildrequire ruby-devel for extensions
-------------------------------------------------------------------
Mon Jan 13 19:52:26 UTC 2014 - coolo@suse.com