addpkg: ruby-parser 3.0.2.0-1
This commit is contained in:
parent
855be1230f
commit
b0a58b602f
1 changed files with 40 additions and 0 deletions
40
ruby-parser/PKGBUILD
Normal file
40
ruby-parser/PKGBUILD
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||||
|
|
||||||
|
_gemname=parser
|
||||||
|
pkgname=ruby-$_gemname
|
||||||
|
pkgver=3.0.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")
|
||||||
|
b2sums=('efb8dd3ccfa24d02b3e85e92fcd08dea34bbc8a650842752529606a3e603027688d762ef64aa8f7007ed94c058d8d5b31e36c674394a82d04ce79014378add29')
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in a new issue