archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-json_pure / trunk / PKGBUILD
blob72077fa1067ee843e70816f91f8c76a3e0ddbe3c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-json_pure
4 pkgver=2.6.3
5 pkgrel=1
6 pkgdesc='A JSON implementation in pure Ruby'
7 arch=(any)
8 url='http://flori.github.io/json/'
9 license=(RUBY)
10 depends=(ruby)
11 makedepends=(ruby-rake)
12 options=(!emptydirs)
13 source=(https://github.com/flori/json/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('41151b4cca7f58a94b559c73ad5e6c1940fc35521e0f69d741de79f80fa50d1a')
16 build() {
17   local _gemdir="$(gem env gemdir)"
18   cd json-$pkgver
19   gem build json_pure.gemspec
20   gem install \
21     --local \
22     --verbose \
23     --ignore-dependencies \
24     --no-user-install \
25     --install-dir "tmp_install/$_gemdir" \
26     --bindir "tmp_install/usr/bin" \
27     json_pure-$pkgver.gem
28   find "tmp_install/$_gemdir/gems/" \
29     -type f \
30     \( \
31         -iname "*.o" -o \
32         -iname "*.c" -o \
33         -iname "*.so" -o \
34         -iname "*.time" -o \
35         -iname "gem.build_complete" -o \
36         -iname "Makefile" \
37     \) \
38     -delete
39   rm -r tmp_install/$_gemdir/cache
42 check() {
43   local _gemdir="$(gem env gemdir)"
44   cd json-$pkgver
45   GEM_HOME="tmp_install/$_gemdir" rake test_pure
48 package() {
49   cd json-$pkgver
50   cp -a tmp_install/* "$pkgdir"/