2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
|
|
|
|
_gemname=oj
|
|
|
|
pkgname=ruby-$_gemname
|
2021-08-03 01:29:53 +00:00
|
|
|
pkgver=3.12.3
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='The fastest JSON parser and object serializer'
|
|
|
|
arch=('x86_64')
|
|
|
|
url='https://github.com/ohler55/oj'
|
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby')
|
|
|
|
options=(!emptydirs)
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2021-08-03 01:29:53 +00:00
|
|
|
b2sums=('5c835fa1f3fc1583b32ea744c8a3bb68e085f97cd4720aa150a55b8688cc9c9703614f292a33689ac90035c45644b648d470767e846e4ab559d4fa289f1cadd0')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
|
|
|
|
gem install \
|
|
|
|
--ignore-dependencies \
|
|
|
|
--no-user-install \
|
|
|
|
--no-document \
|
|
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
|
|
--bindir "$pkgdir/usr/bin" \
|
|
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
|
|
|
|
# delete cache
|
|
|
|
cd "$pkgdir/$_gemdir"
|
|
|
|
rm -rf cache
|
|
|
|
|
|
|
|
cd "gems/$_gemname-$pkgver"
|
|
|
|
# delete unnecessary folders
|
|
|
|
rm -rf test ext
|
|
|
|
# move documentation
|
|
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
mv README.md pages "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
# license
|
|
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
mv LICENSE "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
}
|