archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ruby-cucumber-html-formatter / repos / community-any / PKGBUILD
blob8538f91c22b66e29404f0028022619ad5c3d4792
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-cucumber-html-formatter
4 pkgver=20.3.0
5 pkgrel=1
6 pkgdesc="HTML formatter for Cucumber"
7 arch=(any)
8 url='https://github.com/cucumber/html-formatter/tree/main/ruby'
9 license=(MIT)
10 depends=(ruby-cucumber-messages)
11 makedepends=(npm ruby-rake ruby-rspec ruby-cucumber-compatibility-kit)
12 options=(!emptydirs)
13 source=(https://github.com/cucumber/html-formatter/archive/v$pkgver/cucumber-html-formatter-$pkgver.tar.gz)
14 sha256sums=('f76c2d3aa72f9efa9af8100039b1600ac597c5c477a213efe77d836fd1ee57ec')
16 prepare() {
17   cd html-formatter-$pkgver/ruby
18   sed -r -e 's|~>|>=|g' -e "s/, '< 22.1'//" -i cucumber-html-formatter.gemspec
21 build() {
22   local _gemdir="$(gem env gemdir)"
23   cd html-formatter-$pkgver
24   make prepare
25   cd ruby
26   gem build cucumber-html-formatter.gemspec
27   gem install \
28     --local \
29     --verbose \
30     --ignore-dependencies \
31     --no-user-install \
32     --install-dir "tmp_install/$_gemdir" \
33     --bindir "tmp_install/usr/bin" \
34     cucumber-html-formatter-$pkgver.gem
35   find "tmp_install/$_gemdir/gems/" \
36     -type f \
37     \( \
38         -iname "*.o" -o \
39         -iname "*.c" -o \
40         -iname "*.so" -o \
41         -iname "*.time" -o \
42         -iname "gem.build_complete" -o \
43         -iname "Makefile" \
44     \) \
45     -delete
46   rm -r tmp_install/$_gemdir/cache
49 check() {
50   local _gemdir="$(gem env gemdir)"
51   cd html-formatter-$pkgver/ruby
52   GEM_HOME="tmp_install/$_gemdir" rake
55 package() {
56   cd html-formatter-$pkgver/ruby
57   cp -a tmp_install/* "$pkgdir"/