Date: Sunday, January 1, 2017 @ 00:05:07 Author: anthraxx Revision: 203422
addpkg: ruby-nio4r 2.0.0-2 Added: ruby-nio4r/ ruby-nio4r/repos/ ruby-nio4r/trunk/ ruby-nio4r/trunk/PKGBUILD ----------+ PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) Added: ruby-nio4r/trunk/PKGBUILD =================================================================== --- ruby-nio4r/trunk/PKGBUILD (rev 0) +++ ruby-nio4r/trunk/PKGBUILD 2017-01-01 00:05:07 UTC (rev 203422) @@ -0,0 +1,37 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> + +_gemname=nio4r +pkgname=ruby-${_gemname} +pkgver=2.0.0 +pkgrel=2 +pkgdesc='Abstract, cross-platform stateful I/O selector API for Ruby' +url='https://github.com/celluloid/nio4r' +arch=('i686' 'x86_64') +license=('MIT') +depends=('ruby') +options=('!emptydirs') +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/celluloid/nio4r/archive/v${pkgver}.tar.gz) +sha512sums=('433a98971a735abf0ee3f5473a6acb824ea3322b7418147aacc578260bcc9b989e491d4331c61b94935d048bad655c1c4f552adf58c5da3ec36a589eafa961ca') + +prepare() { + cd ${_gemname}-${pkgver} + sed 's|git ls-files|find|' -i ${_gemname}.gemspec +} + +build() { + cd ${_gemname}-${pkgver} + gem build ${_gemname}.gemspec +} + +package() { + cd ${_gemname}-${pkgver} + local _gemdir="$(gem env gemdir)" + gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem + install -Dm 644 README.md CHANGES.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" + cp -r examples "${pkgdir}/usr/share/doc/${pkgname}" + rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem" + find "${pkgdir}/${_gemdir}" \( -name 'mkmf.log' -or -name 'gem_make.out' \) -delete +} + +# vim: ts=2 sw=2 et: