41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
_gemname=parser
|
|
pkgname=ruby-$_gemname
|
|
pkgver=3.0.3.1
|
|
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=('43a7221b74c4b9518229cbedf4ad35efefef61c6591870a18f5686cd243290d306f9ffa7661ac9bcfecf62536a68a62b6d7510f06d1f663c202c69f2ca8b7619')
|
|
b2sums=('5b00c959f3dea76a4ad2555d3298d6f08c9db061399a29592ad6a3b50e661a1ffa5a22d48897fe2b60fb1cc70d59953f37f9ae500de356667e19cdeb16061d63')
|
|
|
|
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
|
|
}
|