diff --git a/gem2rpm-fix-opensuse-template.diff b/gem2rpm-fix-opensuse-template.diff index acecfae..478ba2d 100644 --- a/gem2rpm-fix-opensuse-template.diff +++ b/gem2rpm-fix-opensuse-template.diff @@ -18,7 +18,7 @@ diff -ru gem2rpm-0.9.2.orig/bin/gem2rpm gem2rpm-0.9.2/bin/gem2rpm ensure out.close() end -Nur in gem2rpm-0.9.2/bin: gem2rpm.orig. +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-30 13:31:08.586730796 +0200 +++ gem2rpm-0.9.2/lib/gem2rpm/specification.rb 2013-05-02 10:33:35.314236973 +0200 @@ -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-26 17:03:53.276463245 +0200 ++++ gem2rpm-0.9.2/templates/opensuse.spec.erb 2014-01-13 20:50:24.423287000 +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,178 @@ +@@ -15,58 +15,181 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -121,14 +121,14 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ --%> -Requires: ruby <%= spec.required_ruby_version %> -BuildRequires: ruby-devel <%= spec.required_ruby_version %> -+BuildRequires: ruby-macros >= 1 ++BuildRequires: ruby-macros >= 3 +<% for req in spec.required_ruby_version -%> +<% 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 %> @@ -206,10 +206,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 @@ -238,7 +238,7 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ +<% unless docdirfiles.empty? -%> +mkdir -p %{buildroot}%{_docdir}/%{name} +<% docdirfiles.each do |file| -%> -+ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/<%= file %> %buildroot/%{_docdir}/%{name}/<%= file %> ++ln -s %{gem_base}/gems/%{mod_full_name}/<%= file %> %buildroot/%{_docdir}/%{name}/<%= file %> +<% end -%> +<% end -%> +<% unless spec.executables.empty? -%> @@ -275,26 +275,29 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ -%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}/ -+<% test_frameworks.each do |framework| -%> -+%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/<%= framework %> ++%{gem_base}/cache/%{mod_full_name}.gem ++%{gem_base}/gems/%{mod_full_name}/ ++<% unless spec.extensions.empty? -%> ++%{gem_extensions}/%{mod_full_name} +<% end -%> -+%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec ++<% test_frameworks.each do |framework| -%> ++%exclude %{gem_base}/gems/%{mod_full_name}/<%= framework %> ++<% end -%> ++%{gem_base}/specifications/%{mod_full_name}.gemspec +<% if spec.has_rdoc -%> +%files doc +%defattr(-,root,root,-) -+%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/ ++%doc %{gem_base}/doc + +<% end -%> +<% unless test_frameworks.empty? -%> +%files testsuite +%defattr(-,root,root,-) +<% test_frameworks.each do |framework| -%> -+%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/<%= framework %> ++%{gem_base}/gems/%{mod_full_name}/<%= framework %> +<% end -%> + +<% end -%> %changelog -Nur in gem2rpm-0.9.2/templates: opensuse.spec.erb~. +Only in gem2rpm-0.9.2/templates: opensuse.spec.erb~ diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 8333c55..2e5df96 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon Jan 13 19:52:26 UTC 2014 - coolo@suse.com + +- switch to the macros Klaus wrote + +- modified patches: + * gem2rpm-fix-opensuse-template.diff +------------------------------------------------------------------- Wed Jun 26 14:48:32 UTC 2013 - coolo@suse.com - doing update-alternatives correctly after reading diff --git a/rubygem-gem2rpm.spec b/rubygem-gem2rpm.spec index 6705841..f46e09f 100644 --- a/rubygem-gem2rpm.spec +++ b/rubygem-gem2rpm.spec @@ -1,7 +1,7 @@ # # spec file for package rubygem-gem2rpm # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed