# Maintainer: George Rawlinson pkgname=ruby-parser _gemname="${pkgname#ruby-}" pkgver=3.1.2.0 pkgrel=1 pkgdesc='A production-ready Ruby parser written in pure Ruby' arch=('any') url='https://github.com/whitequark/parser' license=('MIT') depends=('ruby' 'ruby-ast') makedepends=('ruby-rdoc') options=('!emptydirs') source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem") noextract=("$_gemname-$pkgver.gem") sha512sums=('3ca552cb6fda293e3e52f4b9921467a952c4c7a3288428efdb3e7b1383c053fb4858f79cb2f2c9db0303e1c50765c44747e763a970d78cbc8eef2b2567e9d3c3') b2sums=('f99f82ae66090a8530cd7ad12cc8672f32422b6cb5167679068c29c76485e17af9b15db8b622770e04554c9348cb2ab9f91954eb5ff3a5a528a1f1863df83635') package() { local _gemdir="$(ruby -e'puts Gem.default_dir')" gem install \ --verbose \ --ignore-dependencies \ --no-user-install \ --install-dir "$pkgdir/$_gemdir" \ --bindir "$pkgdir/usr/bin" \ "$_gemname-$pkgver.gem" # delete cache cd "$pkgdir/$_gemdir" rm -vrf cache # delete unnecessary files & folders cd "gems/$_gemname-$pkgver" rm -vrf "$_gemname.gemspec" # move license install -vd "$pkgdir/usr/share/licenses/$pkgname" mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt }