Date: Friday, August 19, 2022 @ 16:52:39 Author: anthraxx Revision: 1270957
addpkg: ruby-bindata 2.4.10-2 Added: ruby-bindata/ ruby-bindata/repos/ ruby-bindata/trunk/ ruby-bindata/trunk/PKGBUILD ----------+ PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) Added: ruby-bindata/trunk/PKGBUILD =================================================================== --- ruby-bindata/trunk/PKGBUILD (rev 0) +++ ruby-bindata/trunk/PKGBUILD 2022-08-19 16:52:39 UTC (rev 1270957) @@ -0,0 +1,57 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> + +_gemname=bindata +pkgname=ruby-${_gemname} +pkgver=2.4.10 +pkgrel=2 +pkgdesc='BinData - Parsing Binary Data in Ruby' +url='https://github.com/dmendel/bindata' +arch=('any') +license=('custom:BSDL') +depends=('ruby') +makedepends=('ruby-rake' 'ruby-rdoc' 'ruby-bundler') +checkdepends=('ruby-minitest') +options=('!emptydirs') +source=(${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz) +sha512sums=('1f8c78a7abfc69c8f8a3c05c5d1ee6b312e60ffd4bc13cab5d8af75afb95e262733a4e3df747f8820938de7d2fea2b99510ca6df46cd718ea2ad487e3533c1ee') +b2sums=('5e1f35ee82f4c3909903ae1cfdd2ab0e9eff48485afdc227bd479c7e5c2c3ce591df4047dd3c3584777aefc808c82ea0ebb834ac75404af2dbbd18e75d7ce705') + +prepare() { + cd ${_gemname}-${pkgver} + sed -r 's|~>|>=|g' -i ${_gemname}.gemspec + sed -r 's|, "< .*"||g' -i ${_gemname}.gemspec + sed 's|git ls-files|find|' -i ${_gemname}.gemspec + sed -e '/coveralls/d' -e '/Coveralls/d' -i ${_gemname}.gemspec test/*.rb +} + +build() { + cd ${_gemname}-${pkgver} + gem build ${_gemname}.gemspec +} + +check() { + cd ${_gemname}-${pkgver} + rake test +} + +package() { + cd ${_gemname}-${pkgver} + local _gemdir="$(gem env gemdir)" + gem install \ + --local \ + --verbose \ + --ignore-dependencies \ + --no-user-install \ + --install-dir "${pkgdir}${_gemdir}" \ + --bindir "${pkgdir}/usr/bin" \ + ${_gemname}-${pkgver}.gem + + install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" + + cd "${pkgdir}/${_gemdir}" + rm -rf cache gems/${_gemname}-${pkgver}/{ext,lib/*/*.so,man} \ + extensions/*/*/${_gemname}-${pkgver}/{mkmf.log,gem_make.out} +} + +# vim: ts=2 sw=2 et: