1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-minitest-rg
6 pkgdesc='Colored red/green output for Minitest'
8 url='https://github.com/blowmage/minitest-rg'
10 depends=(ruby-minitest)
11 checkdepends=(ruby-hoe ruby-rake)
13 source=(https://github.com/blowmage/minitest-rg/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('49a4a7a27ac8be745ea250fce98c1660f39405b2c9d9fa22fafa322207b918d5')
17 cd minitest-rg-$pkgver
18 sed -i "s/s\\.version = .*/s\\.version = \"$pkgver\"/" minitest-rg.gemspec
19 sed -i "s|self.urls = \['http://blowmage.com/minitest-rg'\]|self.homepage = 'http://blowmage.com/minitest-rg'|" Rakefile
23 local _gemdir="$(gem env gemdir)"
24 cd minitest-rg-$pkgver
25 gem build minitest-rg.gemspec
29 --ignore-dependencies \
31 --install-dir "tmp_install/$_gemdir" \
32 --bindir "tmp_install/usr/bin" \
33 minitest-rg-$pkgver.gem
34 find "tmp_install/$_gemdir/gems/" \
41 -iname "gem.build_complete" -o \
45 rm -r tmp_install/$_gemdir/cache
49 local _gemdir="$(gem env gemdir)"
50 cd minitest-rg-$pkgver
51 GEM_HOME="tmp_install/$_gemdir" rake || echo "Tests failed"
55 cd minitest-rg-$pkgver
56 cp -a tmp_install/* "$pkgdir"/
57 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/