# Maintainer: George Rawlinson _gemname=parser pkgname=ruby-$_gemname pkgver=3.0.3.2 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=('eee78f29e19632288348b461cef051138a0ce9cf8b890384a33caebeed909c24d9a8df38c68f0ff378bec4a2951112292b61ed6e5e33b18d430f58be5f61f109') b2sums=('33d05085403758fff18b8e6a914e050fd737aecccced739f5b323b66b3a8943f6fcebefa0d63afa870fe1ce271304370f1f575e4b2f08e02e0154a5d1354817c') 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 }