addpkg: ruby-pry 0.14.1-1

This commit is contained in:
George Rawlinson 2021-07-31 06:06:52 +00:00
parent a54bc7d868
commit 7ade3bfa43
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

46
ruby-pry/PKGBUILD Normal file
View file

@ -0,0 +1,46 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=pry
pkgname=ruby-$_gemname
pkgver=0.14.1
pkgrel=1
pkgdesc="A runtime developer console and IRB alternative"
arch=('any')
url="http://github.com/pry/pry"
license=('MIT')
depends=(
'ruby'
'ruby-coderay'
'ruby-method_source'
)
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('84e8c473937fec9359144e8b404ff225e4b4d190d6f8c1629710788822e3fba819d9a3b8c926ac0ccd5739f082ef12a77820923be7f19f37e1b275782276a22e')
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
cd "gems/$_gemname-$pkgver"
# 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
}