1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-cucumber-gherkin
6 pkgdesc="Gherkin for Ruby"
8 url='https://github.com/cucumber/gherkin/blob/main/ruby'
10 depends=(ruby-cucumber-messages)
11 makedepends=(ruby-rake ruby-rspec)
13 source=(https://github.com/cucumber/gherkin/archive/v$pkgver/cucumber-gherkin-$pkgver.tar.gz)
14 sha256sums=('602f306f793fef8e30cf62527e7055280157cd98c0cdc77e8a1dc6c688e2c09b')
17 cd gherkin-$pkgver/ruby
18 sed -r -e 's|~>|>=|g' -e "s/, '< 22.1'//" -i cucumber-gherkin.gemspec
22 local _gemdir="$(gem env gemdir)"
23 cd gherkin-$pkgver/ruby
24 gem build cucumber-gherkin.gemspec
28 --ignore-dependencies \
30 --install-dir "tmp_install/$_gemdir" \
31 --bindir "tmp_install/usr/bin" \
32 cucumber-gherkin-$pkgver.gem
33 find "tmp_install/$_gemdir/gems/" \
40 -iname "gem.build_complete" -o \
44 rm -r tmp_install/$_gemdir/cache
48 local _gemdir="$(gem env gemdir)"
49 cd gherkin-$pkgver/ruby
50 GEM_HOME="tmp_install/$_gemdir" rake
54 cd gherkin-$pkgver/ruby
55 cp -a tmp_install/* "$pkgdir"/
56 install -Dm644 ../LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/