upgpkg: ruby-yajl-ruby 1.4.3-1

This commit is contained in:
George Rawlinson 2022-06-14 10:00:40 +12:00
parent 3d7fd7af15
commit 1f646d9030
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

View file

@ -1,25 +1,48 @@
_gemname=yajl-ruby # Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=ruby-$_gemname
pkgver=1.4.1 pkgname=ruby-yajl-ruby
pkgrel=2 _gemname="${pkgname#ruby-}"
pkgver=1.4.3
pkgrel=1
pkgdesc='C binding to the excellent YAJL JSON parsing and generation library' pkgdesc='C binding to the excellent YAJL JSON parsing and generation library'
arch=(x86_64) arch=('x86_64')
url='https://github.com/brianmario/yajl-ruby' url='https://github.com/brianmario/yajl-ruby'
license=(MIT) license=('MIT')
depends=(ruby) depends=('ruby')
options=(!emptydirs) options=('!emptydirs')
source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem) source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=($_gemname-$pkgver.gem) noextract=("$_gemname-$pkgver.gem")
sha1sums=('04d0aa7b51a015bd9b3383d4d561fd9067981f76') sha512sums=('8cfde677f11ad80a468dce7876b97aa87fa35d78fcd727d4542e00c09cc28d1cca3301cf7c4e1f773edf2192262ec8d6ffab93b11d488d2b048d8013f6c7645a')
b2sums=('f4ea86014ed7570530e77ba4a2c67bf39c998b816f6100a526406b62ee8c30bb3b7be61853432cd1f6febdc19b20596915a242b2f47645da734b21f2a2c879c3')
package() { package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')" local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
rm -r "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/ext"
install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# find "$pkgdir/$_gemdir/extensions/" -name *.so -delete
# rm -r "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/test"
# install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
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
} }