2022-06-13 22:00:40 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
|
|
|
|
pkgname=ruby-yajl-ruby
|
|
|
|
_gemname="${pkgname#ruby-}"
|
|
|
|
pkgver=1.4.3
|
|
|
|
pkgrel=1
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgdesc='C binding to the excellent YAJL JSON parsing and generation library'
|
2022-06-13 22:00:40 +00:00
|
|
|
arch=('x86_64')
|
2021-07-24 10:00:43 +00:00
|
|
|
url='https://github.com/brianmario/yajl-ruby'
|
2022-06-13 22:00:40 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=('ruby')
|
|
|
|
options=('!emptydirs')
|
|
|
|
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
|
|
|
|
noextract=("$_gemname-$pkgver.gem")
|
|
|
|
sha512sums=('8cfde677f11ad80a468dce7876b97aa87fa35d78fcd727d4542e00c09cc28d1cca3301cf7c4e1f773edf2192262ec8d6ffab93b11d488d2b048d8013f6c7645a')
|
|
|
|
b2sums=('f4ea86014ed7570530e77ba4a2c67bf39c998b816f6100a526406b62ee8c30bb3b7be61853432cd1f6febdc19b20596915a242b2f47645da734b21f2a2c879c3')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
local _gemdir="$(ruby -e'puts Gem.default_dir')"
|
|
|
|
|
2022-06-13 22:00:40 +00:00
|
|
|
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 -rf cache
|
|
|
|
|
|
|
|
# delete unnecessary files & folders
|
|
|
|
rm -vrf "extensions/$CARCH-linux/$(basename $_gemdir)/$_gemname-$pkgver/gem_make.out"
|
|
|
|
cd "gems/$_gemname-$pkgver"
|
|
|
|
find . -type f -name ".*" -delete
|
|
|
|
rm -vrf \
|
|
|
|
.github ext spec script tasks benchmark examples \
|
|
|
|
Gemfile Rakefile "$_gemname.gemspec"
|
|
|
|
|
|
|
|
# move documentation
|
|
|
|
install -vd "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
mv -vt "$pkgdir/usr/share/doc/$pkgname" *.md
|
|
|
|
|
|
|
|
# move license
|
|
|
|
install -vd "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|