upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-cucumber-gherkin / trunk / PKGBUILD
blob514f60e421aab439c0c364da8625d89dd0491d57
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-cucumber-gherkin
4 pkgver=26.2.0
5 pkgrel=1
6 pkgdesc="Gherkin for Ruby"
7 arch=(any)
8 url='https://github.com/cucumber/gherkin/blob/main/ruby'
9 license=(MIT)
10 depends=(ruby-cucumber-messages)
11 makedepends=(ruby-rake ruby-rspec)
12 options=(!emptydirs)
13 source=(https://github.com/cucumber/gherkin/archive/v$pkgver/cucumber-gherkin-$pkgver.tar.gz)
14 sha256sums=('602f306f793fef8e30cf62527e7055280157cd98c0cdc77e8a1dc6c688e2c09b')
16 prepare() {
17   cd gherkin-$pkgver/ruby
18   sed -r -e 's|~>|>=|g' -e "s/, '< 22.1'//" -i cucumber-gherkin.gemspec
21 build() {
22   local _gemdir="$(gem env gemdir)"
23   cd gherkin-$pkgver/ruby
24   gem build cucumber-gherkin.gemspec
25   gem install \
26     --local \
27     --verbose \
28     --ignore-dependencies \
29     --no-user-install \
30     --install-dir "tmp_install/$_gemdir" \
31     --bindir "tmp_install/usr/bin" \
32     cucumber-gherkin-$pkgver.gem
33   find "tmp_install/$_gemdir/gems/" \
34     -type f \
35     \( \
36         -iname "*.o" -o \
37         -iname "*.c" -o \
38         -iname "*.so" -o \
39         -iname "*.time" -o \
40         -iname "gem.build_complete" -o \
41         -iname "Makefile" \
42     \) \
43     -delete
44   rm -r tmp_install/$_gemdir/cache
47 check() {
48   local _gemdir="$(gem env gemdir)"
49   cd gherkin-$pkgver/ruby
50   GEM_HOME="tmp_install/$_gemdir" rake
53 package() {
54   cd gherkin-$pkgver/ruby
55   cp -a tmp_install/* "$pkgdir"/
56   install -Dm644 ../LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/