Date: Tuesday, October 18, 2022 @ 13:16:26 Author: felixonmars Revision: 1332659
addpkg: ruby-async-container 0.16.12-1 Added: ruby-async-container/ ruby-async-container/repos/ ruby-async-container/trunk/ ruby-async-container/trunk/PKGBUILD ----------+ PKGBUILD | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) Added: ruby-async-container/trunk/PKGBUILD =================================================================== --- ruby-async-container/trunk/PKGBUILD (rev 0) +++ ruby-async-container/trunk/PKGBUILD 2022-10-18 13:16:26 UTC (rev 1332659) @@ -0,0 +1,60 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=ruby-async-container +pkgver=0.16.12 +pkgrel=1 +pkgdesc='Abstract container-based parallelism using threads and processes where appropriate' +arch=(any) +url='https://github.com/socketry/async-container' +license=(MIT) +depends=(ruby-async ruby-async-io) +makedepends=(ruby-async-rspec ruby-rspec) +checkdepends=(psmisc) +options=(!emptydirs) +source=(https://github.com/socketry/async-container/archive/v$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('dc298856d04c5d91f0a8dcba36f437062af4c3e721f997a8b726d537fb0b4bd0') + +prepare() { + cd async-container-$pkgver + sed -r -e 's|~>|>=|g' -e '/covered/d' -i async-container.gemspec spec/spec_helper.rb + echo gemspec > gems.rb +} + +build() { + local _gemdir="$(gem env gemdir)" + cd async-container-$pkgver + gem build async-container.gemspec + gem install \ + --local \ + --verbose \ + --ignore-dependencies \ + --no-user-install \ + --install-dir "tmp_install/$_gemdir" \ + --bindir "tmp_install/usr/bin" \ + async-container-$pkgver.gem + find "tmp_install/$_gemdir/gems/" \ + -type f \ + \( \ + -iname "*.o" -o \ + -iname "*.c" -o \ + -iname "*.so" -o \ + -iname "*.time" -o \ + -iname "gem.build_complete" -o \ + -iname "Makefile" \ + \) \ + -delete + rm -r tmp_install/$_gemdir/cache +} + +check() { + local _gemdir="$(gem env gemdir)" + cd async-container-$pkgver + GEM_HOME="tmp_install/$_gemdir" rspec + # https://github.com/socketry/async-container/issues/24 + killall --ns $$ -e bundle -u builduser +} + +package() { + cd async-container-$pkgver + cp -a tmp_install/* "$pkgdir"/ +}
