diff --git a/ruby-coderay/PKGBUILD b/ruby-coderay/PKGBUILD new file mode 100644 index 0000000..029112e --- /dev/null +++ b/ruby-coderay/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: George Rawlinson + +_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" +}