%rails_save_gemfile() \ cp Gemfile{,.upstream} \ mv Gemfile.lock{,.upstream} \ %{nil} %rails_regen_gemfile_lock() \ ./bin/bundle exec ./bin/rails --version \ diff -urN Gemfile.lock{.upstream,} ||: \ %{nil} %rails_write_appinfo() \ 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" \ cp ${S} ${SB} \ perl -p -i -e 's|\\\@RUBY_SUFFIX\\\@|%{rb_suffix}|g' "${S}" \ diff -urN ${SB} ${S} || : \ rm ${SB} \ done \ %{nil} %ruby_fix_shebang() \ %{nil} \ %{nil}