2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
|
|
|
|
|
|
_gemname=oj
|
|
|
|
pkgname=ruby-$_gemname
|
2021-08-16 22:55:22 +00:00
|
|
|
pkgver=3.13.2
|
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')
|
2021-08-10 00:09:31 +00:00
|
|
|
makedepends=('ruby-rdoc')
|
2021-07-24 10:00:43 +00:00
|
|
|
options=(!emptydirs)
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
2021-08-16 22:55:22 +00:00
|
|
|
b2sums=('e74ce94a4eefdd26ba257f01fae4f7e37015ec96c1d80e4dbb81d00272a7f2e1ee2b9d38f73ba75cb779b84a65b16eced9c64d5c1d66458278c61556612d7fb5')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
|
|
|
|
gem install \
|
2021-08-10 00:09:31 +00:00
|
|
|
--verbose \
|
2021-07-24 10:00:43 +00:00
|
|
|
--ignore-dependencies \
|
|
|
|
--no-user-install \
|
|
|
|
--install-dir "$pkgdir/$_gemdir" \
|
|
|
|
--bindir "$pkgdir/usr/bin" \
|
|
|
|
"$_gemname-$pkgver.gem"
|
|
|
|
|
|
|
|
# delete cache
|
|
|
|
cd "$pkgdir/$_gemdir"
|
2021-08-10 00:09:31 +00:00
|
|
|
rm -vrf cache
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-08-10 00:09:31 +00:00
|
|
|
# delete unnecessary files & folders
|
2021-08-16 22:55:22 +00:00
|
|
|
rm -vrf "extensions/$CARCH-linux/$(basename $_gemdir)/$_gemname-$pkgver/gem_make.out"
|
2021-07-24 10:00:43 +00:00
|
|
|
cd "gems/$_gemname-$pkgver"
|
2021-08-10 00:09:31 +00:00
|
|
|
rm -vrf test ext
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# move documentation
|
|
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
2021-08-10 00:09:31 +00:00
|
|
|
mv -v README.md pages "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# license
|
|
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
2021-08-10 00:09:31 +00:00
|
|
|
mv -v LICENSE "$pkgdir/usr/share/licenses/$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|