upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-ruby_memcheck / repos / community-any / PKGBUILD
blob18f58bf1bf20e524eaa299736fcdcf7f9b2162d0
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-ruby_memcheck
4 pkgver=1.2.0
5 _commit=f4b8fe6140fcd38747a24ea4f99a87f5f56c950a
6 pkgrel=2
7 pkgdesc='Use Valgrind memcheck without going crazy'
8 arch=(any)
9 url='https://github.com/Shopify/ruby_memcheck'
10 license=(MIT)
11 depends=(valgrind ruby-nokogiri)
12 makedepends=(git ruby-minitest ruby-minitest-parallel_fork ruby-rake ruby-rake-compiler
13              ruby-rspec-core ruby-rubocop)
14 options=(!emptydirs)
15 source=(git+https://github.com/Shopify/ruby_memcheck.git#commit=$_commit)
16 sha256sums=('SKIP')
18 build() {
19   local _gemdir="$(gem env gemdir)"
20   cd ruby_memcheck
21   gem build ruby_memcheck.gemspec
22   gem install \
23     --local \
24     --verbose \
25     --ignore-dependencies \
26     --no-user-install \
27     --install-dir "tmp_install/$_gemdir" \
28     --bindir "tmp_install/usr/bin" \
29     ruby_memcheck-$pkgver.gem
30   find "tmp_install/$_gemdir/gems/" \
31     -type f \
32     \( \
33         -iname "*.o" -o \
34         -iname "*.c" -o \
35         -iname "*.so" -o \
36         -iname "*.time" -o \
37         -iname "gem.build_complete" -o \
38         -iname "Makefile" \
39     \) \
40     -delete
41   rm -r tmp_install/$_gemdir/cache
44 check() {
45   local _gemdir="$(gem env gemdir)"
46   cd ruby_memcheck
47   GEM_HOME="tmp_install/$_gemdir" rake
50 package() {
51   cd ruby_memcheck
52   cp -a tmp_install/* "$pkgdir"/
53   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/