archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-cucumber-ci-environment / repos / community-any / PKGBUILD
blob5209c88f72c274ec67818f5d99085b85333b938c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-cucumber-ci-environment
4 pkgver=9.2.0
5 pkgrel=1
6 pkgdesc='Detect CI Environment from environment variables'
7 arch=(any)
8 url='https://github.com/cucumber/ci-environment'
9 license=(MIT)
10 depends=(ruby)
11 makedepends=(ruby-rake ruby-rspec)
12 options=(!emptydirs)
13 source=(https://github.com/cucumber/ci-environment/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('b17edfcdbd6a2da625b502b3dca63a30661b361cd7a312b5559e98861aed63ca')
16 build() {
17   local _gemdir="$(gem env gemdir)"
18   cd ci-environment-$pkgver/ruby
19   rake lib/cucumber/ci_environment/CiEnvironments.json
20   gem build cucumber-ci-environment.gemspec
21   gem install \
22     --local \
23     --verbose \
24     --ignore-dependencies \
25     --no-user-install \
26     --install-dir "tmp_install/$_gemdir" \
27     --bindir "tmp_install/usr/bin" \
28     cucumber-ci-environment-$pkgver.gem
29   find "tmp_install/$_gemdir/gems/" \
30     -type f \
31     \( \
32         -iname "*.o" -o \
33         -iname "*.c" -o \
34         -iname "*.so" -o \
35         -iname "*.time" -o \
36         -iname "gem.build_complete" -o \
37         -iname "Makefile" \
38     \) \
39     -delete
40   rm -r tmp_install/$_gemdir/cache
43 check() {
44   local _gemdir="$(gem env gemdir)"
45   cd ci-environment-$pkgver/ruby
46   GEM_HOME="tmp_install/$_gemdir" rake
49 package() {
50   cd ci-environment-$pkgver/ruby
51   cp -a tmp_install/* "$pkgdir"/
52   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/