addpkg: ruby-coderay 1.1.3-1

This commit is contained in:
George Rawlinson 2021-07-31 06:06:20 +00:00
parent 0d2ca30809
commit f4c981e462
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

42
ruby-coderay/PKGBUILD Normal file
View file

@ -0,0 +1,42 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
_gemname=coderay
pkgname=ruby-$_gemname
pkgver=1.1.3
pkgrel=1
pkgdesc="Fast syntax highlighting for selected languages"
arch=('any')
url="https://github.com/rubychan/coderay"
license=('MIT')
depends=('ruby')
makedepends=('ruby-rdoc')
options=('!emptydirs')
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
b2sums=('2efb285ae1eeef67367959f918ee27aed8ce404cfef28af23475a0ec62ffec7d3e9f2b5a6b81bf6c7088214b344b799662ed0928bd98687cfd5def739c2542e3')
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" README_INDEX.rdoc
# move license
install -vd "$pkgdir/usr/share/licenses/$pkgname"
mv -v MIT-LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}