Accepting request 679513 from devel:languages:ruby
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/679513 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ruby-common?expand=0&rev=14
This commit is contained in:
commit
faf94f33a6
@ -42,6 +42,7 @@ options.gemname=nil
|
||||
options.gemversion=nil
|
||||
options.gemsuffix=nil
|
||||
options.otheropts=[]
|
||||
options.skipped_docs=[]
|
||||
options.ua_dir='/etc/alternatives'
|
||||
options.docdir='/usr/share/doc/packages'
|
||||
# once we start fixing packages set this to true
|
||||
@ -139,10 +140,10 @@ opt_parser = OptionParser.new do |opts|
|
||||
options.otheropts << '-E'
|
||||
end
|
||||
opts.on('--no-ri', 'Forwarded to gem install') do |v|
|
||||
options.otheropts << '--no-ri'
|
||||
options.skipped_docs << 'ri'
|
||||
end
|
||||
opts.on('--no-rdoc', 'Forwarded to gem install') do |v|
|
||||
options.otheropts << '--no-rdoc'
|
||||
options.skipped_docs << 'rdoc'
|
||||
end
|
||||
opts.separator ""
|
||||
opts.separator "Common options:"
|
||||
@ -203,6 +204,9 @@ GILogger.info "Using suffix #{options.rubysuffix}"
|
||||
|
||||
cmdline = [gembinary, 'install', '--verbose', '--local', '--build-root', options.buildroot]
|
||||
cmdline += options.otheropts
|
||||
unless options.skipped_docs.empty?
|
||||
cmdline << '--no-document'
|
||||
end
|
||||
cmdline << options.gemfile
|
||||
unless options.extconfopts.nil?
|
||||
cmdline << '--'
|
||||
|
13
rails.macros
13
rails.macros
@ -4,8 +4,7 @@
|
||||
%{nil}
|
||||
|
||||
%rails_regen_gemfile_lock() \
|
||||
find -type f -name .gitkeep -print -delete \
|
||||
bundle exec rails --version \
|
||||
./bin/bundle exec ./bin/rails --version \
|
||||
diff -urN Gemfile.lock{.upstream,} ||: \
|
||||
%{nil}
|
||||
|
||||
@ -13,6 +12,16 @@
|
||||
echo -e "---\\\n:ruby_abi: %{rb_build_abi}\\\n" > .appinfo.yml \
|
||||
%{nil}
|
||||
|
||||
%rails_fix_ruby_shebang() \
|
||||
for S in $(grep -l '#!.*ruby' %* ) ; do \
|
||||
SB="${S}.backup" \
|
||||
cp ${S} ${SB} \
|
||||
perl -p -i -e 's|#!/usr/bin/env ruby|#!%{_bindir}/ruby.%{rb_suffix}|g' $S \
|
||||
diff -urN ${SB} ${S} || : \
|
||||
rm ${SB} \
|
||||
done \
|
||||
%{nil}
|
||||
|
||||
%rails_fix_ruby_suffix() \
|
||||
for S in $(grep -r -l '@RUBY_SUFFIX@' ${RPM_SOURCE_DIR}/ | grep -v '\.spec$') ; do \
|
||||
SB="${S}.backup" \
|
||||
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 7 20:30:00 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- rails.macros: add macro to fix ruby shebang line
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 7 20:00:55 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- rails.macros: always use ./bin/* stubs for calling binaries
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 30 14:54:03 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- do not try to delete git files in the rails macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 21 16:44:00 UTC 2018 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- --no-rdoc/--no-ri are obsolete in, if we get it passed in convert
|
||||
them to --no-document
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 6 15:11:27 UTC 2018 - mrueckert@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ruby-common
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: ruby-common
|
||||
Version: 2.1
|
||||
Version: 2.6
|
||||
Release: 0
|
||||
# ruby-macros and ruby-common version
|
||||
%define rpm_macros_version 5
|
||||
@ -26,7 +26,6 @@ Release: 0
|
||||
%else
|
||||
%bcond_without ship_gemrc
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source1: gem_build_cleanup
|
||||
Source2: gemrc
|
||||
Source4: rubygems.attr
|
||||
@ -48,10 +47,8 @@ License: MIT
|
||||
Group: Development/Languages/Ruby
|
||||
Url: https://github.com/openSUSE/ruby-packaging/
|
||||
Requires: /usr/bin/getopt
|
||||
#Requires: ruby-devel
|
||||
Requires: rubygem(gem2rpm)
|
||||
Recommends: rubygem(%{rb_default_ruby_abi}:gem2rpm)
|
||||
#Requires: rubygems > 1.8
|
||||
Requires: fdupes
|
||||
BuildArch: noarch
|
||||
Provides: ruby-macros = %{rpm_macros_version}
|
||||
@ -101,7 +98,7 @@ install -D -m 0644 %{S:13} %{buildroot}/usr/lib/rpm/fileattrs/gemfile.attr
|
||||
install -D -m 0755 %{S:14} %{buildroot}/usr/lib/rpm/gemfile.rb
|
||||
install -D -m 0644 %{S:15} %{buildroot}/etc/rpm/macros.rails
|
||||
install -D -m 0755 %{S:16} %{buildroot}%{_bindir}/g2r
|
||||
install -D -m 0644 %{S:17} %{buildroot}/usr/lib/rpm/fileattrs/rubygems_bundled.attr
|
||||
install -D -m 0644 %{S:17} %{buildroot}/usr/lib/rpm/fileattrs/rubygems_bundled.attr
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
Loading…
Reference in New Issue
Block a user