addpkg: ruby-tomlrb 2.0.1-1

This commit is contained in:
George Rawlinson 2021-07-24 12:15:20 +00:00
parent 0de9408c8e
commit 3a037a4662
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

39
ruby-tomlrb/PKGBUILD Normal file
View file

@ -0,0 +1,39 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Eric Berquist <eric dot berquist at gmail dot com>
# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux (a) free.fr>
_gemname=tomlrb
pkgname=ruby-$_gemname
pkgver=2.0.1
pkgrel=1
pkgdesc="A racc based toml parser"
arch=('any')
url="https://github.com/fbernier/tomlrb"
license=('MIT')
depends=('ruby')
makedepends=('rubygems' 'ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('f48dd8ad891c962aaddced0badc795d64f558b18e6c933e731b589688665eb8c209d647f0f5c51cfb03983ec10d91e7517fb58a69ed0bd871ee2ef3f7ead31cd')
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 -vrf cache
# move license
cd "gems/$_gemname-$pkgver"
install -vd "$pkgdir/usr/share/licenses/$pkgname"
mv -vt "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
}