addpkg: ruby-ruby-progressbar 1.11.0-1

This commit is contained in:
George Rawlinson 2021-07-31 22:10:51 +00:00
parent e5fd11a44f
commit 7425318fab
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

View file

@ -0,0 +1,44 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=ruby-progressbar
pkgname=ruby-$_gemname
pkgver=1.11.0
pkgrel=1
pkgdesc="A flexible text progress bar library for Ruby"
arch=('any')
url="https://github.com/excon/exco://github.com/jfelchner/ruby-progressbar"
license=('MIT')
depends=('ruby')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('7e25622c983a6efaaa3597f92019d6ee5ee0e9c602a8955cdac2e7f1170e07141544635d2a5be6a17e13cebdc26aa259d3c77c5f2fa2c44ab4f8af7305a6dba2')
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
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 -vrf cache
# delete unnecessary files & folders
cd "gems/$_gemname-$pkgver"
rm -vrf Rakefile
# 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.txt
}