From d34e5614e61dc29c9c8e3688cf5ce392c781cb2abb5bfa6127d8511ae6f93503 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 27 May 2013 07:59:43 +0000 Subject: [PATCH] Accepting request 176253 from devel:languages:ruby:extensions Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/176253 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rubygem-gem2rpm?expand=0&rev=6 --- gem2rpm-fix-opensuse-template.diff | 76 ++++++++++++++++++------------ rubygem-gem2rpm.changes | 11 +++++ 2 files changed, 58 insertions(+), 29 deletions(-) diff --git a/gem2rpm-fix-opensuse-template.diff b/gem2rpm-fix-opensuse-template.diff index 305dc09..b01003a 100644 --- a/gem2rpm-fix-opensuse-template.diff +++ b/gem2rpm-fix-opensuse-template.diff @@ -1,6 +1,6 @@ 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 +--- gem2rpm-0.9.2.orig/bin/gem2rpm 2013-04-30 13:31:08.586730796 +0200 ++++ gem2rpm-0.9.2/bin/gem2rpm 2013-05-02 10:33:35.314236973 +0200 @@ -121,9 +121,15 @@ if output_file.nil? Gem2Rpm::convert(gemfile, template, $stdout, nongem, local, doc_subpackage) unless deps @@ -18,10 +18,10 @@ diff -ru gem2rpm-0.9.2.orig/bin/gem2rpm gem2rpm-0.9.2/bin/gem2rpm ensure out.close() end -Only in gem2rpm-0.9.2/bin: gem2rpm.orig +Nur 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 +--- 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 @@ -6,7 +6,11 @@ class Specification < SimpleDelegator # A long description of gem wrapped to 78 characters. @@ -54,8 +54,8 @@ diff -ru gem2rpm-0.9.2.orig/lib/gem2rpm/specification.rb gem2rpm-0.9.2/lib/gem2r def development_dependencies super.map {|d| Gem2Rpm::Dependency.new d} 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 +--- gem2rpm-0.9.2.orig/lib/gem2rpm.rb 2013-04-30 13:31:08.586730796 +0200 ++++ gem2rpm-0.9.2/lib/gem2rpm.rb 2013-05-02 10:33:35.314236973 +0200 @@ -31,11 +31,14 @@ end @@ -73,11 +73,9 @@ diff -ru gem2rpm-0.9.2.orig/lib/gem2rpm.rb gem2rpm-0.9.2/lib/gem2rpm.rb download_path = "" unless local begin -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 +--- 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-05-14 12:10:57.659712421 +0200 @@ -1,7 +1,7 @@ # -# spec file for package rubygem-<%= spec.name %> (Version <%= spec.version %>) @@ -88,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,142 @@ +@@ -15,58 +15,161 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -118,9 +116,9 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/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 %> @@ -164,23 +162,33 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/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 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 ++<% test_frameworks = Hash.new ++ docdirfiles = [] ++ format.file_entries.each do |entry| ++ # new rubygems version has it different ++ if entry.kind_of?(Array) ++ path=entry[0]['path'] ++ else ++ path=entry ++ end ++ path.gsub!(%r{^\./}, '') ++ %w(test spec).each { |framework| ++ test_frameworks[framework] = 1 if path.index(framework + "/") == 0 ++ } ++ %w(LICENSE MIT-LICENSE LICENSE.md MIT-LICENSE.txt COPYING LICENSE.rdoc LEGAL.rdoc README.rdoc ++ COPYING.txt README.txt README README.md).each { |file| ++ # $stderr.puts "PATH #{path} #{file}" ++ docdirfiles << file if path == file ++ } ++ end ++ ++ test_frameworks = test_frameworks.keys.sort +-%> +<% unless test_frameworks.empty? -%> +%package testsuite @@ -190,7 +198,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 @@ -210,7 +218,13 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ +<% spec.executables.each do |executable| -%> +mv %{buildroot}%{_bindir}/<%= executable %>{,%{mod_branch}} +ln -s <%= executable %>%{mod_branch} %{buildroot}%{_bindir}/<%= executable %> -+<%end -%> ++<% end -%> ++<% 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 %> ++<% end -%> ++<% end -%> +<% unless spec.executables.empty? -%> + +%post @@ -238,6 +252,9 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ -%{_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 %> @@ -248,12 +265,12 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ +%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/<%= framework %> +<% end -%> +%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec -+ + +<% if spec.has_rdoc -%> +%files doc +%defattr(-,root,root,-) +%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/ - ++ +<% end -%> +<% unless test_frameworks.empty? -%> +%files testsuite @@ -264,3 +281,4 @@ diff -ru gem2rpm-0.9.2.orig/templates/opensuse.spec.erb gem2rpm-0.9.2/templates/ + +<% end -%> %changelog +Nur in gem2rpm-0.9.2/templates: opensuse.spec.erb~. diff --git a/rubygem-gem2rpm.changes b/rubygem-gem2rpm.changes index 67fc56f..6d92ca5 100644 --- a/rubygem-gem2rpm.changes +++ b/rubygem-gem2rpm.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue May 7 09:34:43 UTC 2013 - coolo@suse.com + +- more license files + +------------------------------------------------------------------- +Thu May 2 08:58:11 UTC 2013 - coolo@suse.com + +- ciaran wants to see the license files mentioned in %docdir, so create + symlinks + ------------------------------------------------------------------- Sun Apr 28 06:55:08 UTC 2013 - coolo@suse.com