# Maintainer: George Rawlinson _gemname=parser pkgname=ruby-$_gemname pkgver=3.0.3.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=('63ab4d2d2c1cd5de57cfd3ad4e0addfe84994b16d2e5b32eba0fc521492dd9b062e6ab7c31b0bc36ebba0dae5635e08d39dafdf6d5eea64aca22df7649d71e0b') b2sums=('437c30dabb933e9492305938a4f0f20e3a54f6c7184a585a27aadd41998d18a350227652d9cca70e5c080fd954d103450e1c0f7735ffba23c028a6c49a5ebce9') 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 }