forked from pool/rubygem-gem2rpm
Accepting request 181056 from devel:languages:ruby:extensions
- doing update-alternatives correctly after reading http://en.opensuse.org/openSUSE:Packaging_Multiple_Version_guidelines - avoid --force in update-alternatives as SLE11 does not have that ;( OBS-URL: https://build.opensuse.org/request/show/181056 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=9
This commit is contained in:
parent
12e58c4955
commit
caef0e7a61
@ -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 2013-06-10 12:04:00.205318552 +0200
|
||||
+++ gem2rpm-0.9.2/templates/opensuse.spec.erb 2013-06-26 17:03:53.276463245 +0200
|
||||
@@ -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,169 @@
|
||||
@@ -15,58 +15,178 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
@ -143,6 +143,9 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
+<% unless spec.rdoc_options.empty? -%>
|
||||
+BuildRequires: rubygem(rdoc) > 3.10
|
||||
+<% end -%>
|
||||
+<% unless spec.executables.empty? -%>
|
||||
+BuildRequires: update-alternatives
|
||||
+<% end -%>
|
||||
+<% unless spec.homepage.nil? || spec.homepage.empty? -%>
|
||||
Url: <%= spec.homepage %>
|
||||
-Source: %{mod_name}-%{version}.gem
|
||||
@ -164,7 +167,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
%description
|
||||
-<%= spec.description %>
|
||||
+<%= spec.description -%>
|
||||
|
||||
+
|
||||
+<% if spec.has_rdoc -%>
|
||||
+%package doc
|
||||
+Summary: RDoc documentation for %{mod_name}
|
||||
@ -206,7 +209,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
+
|
||||
+%description testsuite
|
||||
+Test::Unit or RSpec files, useful for developers.
|
||||
+
|
||||
|
||||
+<% end -%>
|
||||
%prep
|
||||
+#gem_unpack
|
||||
@ -223,9 +226,14 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
%gem_cleanup
|
||||
-<% end %>
|
||||
+<% end -%>
|
||||
+<% unless spec.executables.empty? -%>
|
||||
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
+<% end -%>
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+mv %{buildroot}%{_bindir}/<%= executable %>{,%{mod_branch}}
|
||||
+ln -s <%= executable %>%{mod_branch} %{buildroot}%{_bindir}/<%= executable %>
|
||||
+touch %{buildroot}%{_sysconfdir}/alternatives/<%= executable %>
|
||||
+ln -s %{_sysconfdir}/alternatives/<%= executable %> %{buildroot}%{_bindir}/<%= executable %>
|
||||
+
|
||||
+<% end -%>
|
||||
+<% unless docdirfiles.empty? -%>
|
||||
+mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
@ -237,7 +245,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
+
|
||||
+%post
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+/usr/sbin/update-alternatives --force --install \
|
||||
+/usr/sbin/update-alternatives --install \
|
||||
+ %{_bindir}/<%= executable %> <%= executable %> %{_bindir}/<%= executable %>%{mod_branch} %{mod_weight}
|
||||
+<% end -%>
|
||||
|
||||
@ -254,18 +262,18 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
-<% spec.executables.each do |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}/
|
||||
+<% unless docdirfiles.empty? -%>
|
||||
+%{_docdir}/%{name}
|
||||
+<% end -%>
|
||||
+<% spec.executables.each do |executable| -%>
|
||||
+%{_bindir}/<%= executable %>%{mod_branch}
|
||||
+%ghost %{_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}/
|
||||
+%ghost %{_sysconfdir}/alternatives/<%= executable %>
|
||||
+<% end -%>
|
||||
+%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
|
||||
+%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 14:48:32 UTC 2013 - coolo@suse.com
|
||||
|
||||
- doing update-alternatives correctly after reading
|
||||
http://en.opensuse.org/openSUSE:Packaging_Multiple_Version_guidelines
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 08:29:30 UTC 2013 - coolo@suse.com
|
||||
|
||||
- avoid --force in update-alternatives as SLE11 does not have that ;(
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 10 10:04:12 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user