Date: Saturday, October 22, 2022 @ 12:38:54 Author: felixonmars Revision: 1333562
addpkg: ruby-shoulda-context 2.0.0-1 Added: ruby-shoulda-context/ ruby-shoulda-context/repos/ ruby-shoulda-context/trunk/ ruby-shoulda-context/trunk/PKGBUILD ----------+ PKGBUILD | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) Added: ruby-shoulda-context/trunk/PKGBUILD =================================================================== --- ruby-shoulda-context/trunk/PKGBUILD (rev 0) +++ ruby-shoulda-context/trunk/PKGBUILD 2022-10-22 12:38:54 UTC (rev 1333562) @@ -0,0 +1,66 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=ruby-shoulda-context +pkgver=2.0.0 +pkgrel=1 +pkgdesc='Minitest & Test::Unit context framework' +arch=(any) +url='https://github.com/thoughtbot/shoulda-context' +license=(MIT) +depends=(ruby) +checkdepends=(ruby-m ruby-minitest ruby-mocha ruby-rake ruby-snowglobe ruby-test-unit + ruby-warnings_logger) +options=(!emptydirs) +source=(https://github.com/thoughtbot/shoulda-context/archive/v$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('f83093bbc37b58a2d7e7dfad8ff7c426f4e8ba3ea6d17977750e18ff4e696df4') + +prepare() { + cd shoulda-context-$pkgver + sed 's|git ls-files -- exe/\*|find exe -type f|' -i shoulda-context.gemspec + sed 's|git ls-files -- {test,spec,features}/\*|echo|' -i shoulda-context.gemspec + sed 's|git ls-files|find -type f|' -i shoulda-context.gemspec + sed -i -e 's|~>|>=|' -e '/appraisal/d;/byebug/d;/pry/d;/rubocop/d' Gemfile + # Multiple hacks to avoid appraisal and rails + sed -i 's/Tests::CurrentBundle.instance.appraisal_in_use?/true/;/pry/d' Rakefile + sed -i '/current_bundle/d;/assert_appraisal/d;/pry-byebug/d;/rails_application_with_shoulda_context/d' test/test_helper.rb Rakefile + rm Gemfile.lock + rm test/shoulda/test_framework_detection_test.rb test/shoulda/rerun_snippet_test.rb test/shoulda/railtie_test.rb +} + +build() { + local _gemdir="$(gem env gemdir)" + cd shoulda-context-$pkgver + gem build shoulda-context.gemspec + gem install \ + --local \ + --verbose \ + --ignore-dependencies \ + --no-user-install \ + --install-dir "tmp_install/$_gemdir" \ + --bindir "tmp_install/usr/bin" \ + shoulda-context-$pkgver.gem + find "tmp_install/$_gemdir/gems/" \ + -type f \ + \( \ + -iname "*.o" -o \ + -iname "*.c" -o \ + -iname "*.so" -o \ + -iname "*.time" -o \ + -iname "gem.build_complete" -o \ + -iname "Makefile" \ + \) \ + -delete + rm -r tmp_install/$_gemdir/cache +} + +check() { + local _gemdir="$(gem env gemdir)" + cd shoulda-context-$pkgver + GEM_HOME="tmp_install/$_gemdir" rake +} + +package() { + cd shoulda-context-$pkgver + cp -a tmp_install/* "$pkgdir"/ + install -Dm644 MIT-LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}
