upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-rspec-memory / repos / community-any / PKGBUILD
blob613fc1f85553e0fe505b404dc2bd332365068704
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-rspec-memory
4 pkgver=1.0.3
5 pkgrel=2
6 pkgdesc='RSpec helpers for checking memory allocations'
7 arch=(any)
8 url='https://github.com/socketry/rspec-memory'
9 license=(MIT)
10 depends=(ruby-rspec)
11 checkdepends=(ruby-covered ruby-rake)
12 options=(!emptydirs)
13 source=(https://github.com/socketry/rspec-memory/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('4fcbf51cd43844293e4397ead2a3e79a80ca2760b810bf83d4804d6e41abdeb1')
16 prepare() {
17   cd rspec-memory-$pkgver
18   sed -r -e 's|~>|>=|g' -i rspec-memory.gemspec
19   echo gemspec > gems.rb
22 build() {
23   local _gemdir="$(gem env gemdir)"
24   cd rspec-memory-$pkgver
25   gem build rspec-memory.gemspec
26   gem install \
27     --local \
28     --verbose \
29     --ignore-dependencies \
30     --no-user-install \
31     --install-dir "tmp_install/$_gemdir" \
32     --bindir "tmp_install/usr/bin" \
33     rspec-memory-$pkgver.gem
34   find "tmp_install/$_gemdir/gems/" \
35     -type f \
36     \( \
37         -iname "*.o" -o \
38         -iname "*.c" -o \
39         -iname "*.so" -o \
40         -iname "*.time" -o \
41         -iname "gem.build_complete" -o \
42         -iname "Makefile" \
43     \) \
44     -delete
45   rm -r tmp_install/$_gemdir/cache
48 check() {
49   local _gemdir="$(gem env gemdir)"
50   cd rspec-memory-$pkgver
51   GEM_HOME="tmp_install/$_gemdir" rspec
54 package() {
55   cd rspec-memory-$pkgver
56   cp -a tmp_install/* "$pkgdir"/