2021-07-31 21:50:21 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
|
2022-06-13 21:42:43 +00:00
|
|
|
pkgname=ruby-parser
|
|
|
|
_gemname="${pkgname#ruby-}"
|
2022-08-09 09:05:56 +00:00
|
|
|
pkgver=3.1.2.1
|
2021-07-31 21:50:21 +00:00
|
|
|
pkgrel=1
|
2022-06-13 21:42:43 +00:00
|
|
|
pkgdesc='A production-ready Ruby parser written in pure Ruby'
|
2021-07-31 21:50:21 +00:00
|
|
|
arch=('any')
|
2022-06-13 21:42:43 +00:00
|
|
|
url='https://github.com/whitequark/parser'
|
2021-07-31 21:50:21 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby' 'ruby-ast')
|
|
|
|
makedepends=('ruby-rdoc')
|
|
|
|
options=('!emptydirs')
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2022-08-09 09:05:56 +00:00
|
|
|
sha512sums=('5897005fa29492deb7774bb013445e787da814d776ac8ce819f22fda0c600ed9a9a94828f16ff049de94c23fca06d0309112186750c1f0e4ae676996dba9a4d9')
|
|
|
|
b2sums=('8ac59008f56918943f3449a6e972605b8396063198fb8dddebb5baa30a6a1fe1c17896a7149a52e7f5e766794f64f523d34794797c6706f726141ed47e4002b2')
|
2021-07-31 21:50:21 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|