LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File rails.macros of Package ruby-common (Project home:darix:apps)

%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}