archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-vcr / trunk / PKGBUILD
blobf6b4e5e9f5c3b71c9ed30b4b29fe24820e8be1d5
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-vcr
4 pkgver=6.1.0
5 pkgrel=1
6 pkgdesc="Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests."
7 arch=(any)
8 url='https://github.com/vcr/vcr'
9 license=(MIT)
10 depends=(ruby)
11 makedepends=(ruby-rspec ruby-test-unit ruby-rake ruby-pry)
12 options=(!emptydirs)
13 source=(https://github.com/vcr/vcr/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('b6b6e2444e1a837a0568fbaa721934270c1500bee466562cc4980621c7522af7')
16 prepare() {
17   cd vcr-$pkgver
18   sed -i 's|~>|>=|' -i vcr.gemspec
21 build() {
22   local _gemdir="$(gem env gemdir)"
23   cd vcr-$pkgver
24   gem build vcr.gemspec
25   gem install \
26     --local \
27     --verbose \
28     --ignore-dependencies \
29     --no-user-install \
30     --install-dir "tmp_install/$_gemdir" \
31     --bindir "tmp_install/usr/bin" \
32     vcr-$pkgver.gem
33   find "tmp_install/$_gemdir/gems/" \
34     -type f \
35     \( \
36         -iname "*.o" -o \
37         -iname "*.c" -o \
38         -iname "*.so" -o \
39         -iname "*.time" -o \
40         -iname "gem.build_complete" -o \
41         -iname "Makefile" \
42     \) \
43     -delete
44   rm -r tmp_install/$_gemdir/cache
47 # Disabled: revisit after a lot more gems are packaged
48 # check() {
49 #   local _gemdir="$(gem env gemdir)"
50 #   cd vcr-$pkgver
51 #   GEM_HOME="tmp_install/$_gemdir" rake
52 # }
54 package() {
55   cd vcr-$pkgver
56   cp -a tmp_install/* "$pkgdir"/
57   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/