Marcus Rueckert
6106252abc
- switch requires of the autogenerated subpackages from rb_suffix-rubygem-gemname = version to rubygem(rb_abi:gemname) = version - split our the rails part - we need bundler now. given ruby 2.5 will have it intree anyway, this soon wont be a big burden. - add support to generate requires from Gemfile.lock - package the buildinfo dir - allow passing options to extconf.rb OBS-URL: https://build.opensuse.org/request/show/556491 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=95
29 lines
677 B
Plaintext
29 lines
677 B
Plaintext
%rails_save_gemfile() \
|
|
cp Gemfile{,.upstream} \
|
|
mv Gemfile.lock{,.upstream} \
|
|
%{nil}
|
|
|
|
%rails_regen_gemfile_lock() \
|
|
find -type f -name .gitkeep -print -delete \
|
|
bundle exec 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_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}
|