1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-async-websocket
5 _commit=f05d33646a4b7866581c43c683ff0abbadf8acc2
7 pkgdesc='An async websocket library on top of websocket-driver'
9 url='https://github.com/socketry/async-websocket'
11 depends=(ruby-async-http ruby-async-io ruby-protocol-rack ruby-protocol-websocket)
13 checkdepends=(ruby-bake-modernize ruby-bake-test ruby-bake-test-external ruby-rack ruby-covered
14 ruby-sus ruby-sus-fixtures-async-http)
16 source=(git+https://github.com/socketry/async-websocket.git#commit=$_commit)
21 sed -r -e 's|~>|>=|g' -e '/signing_key/d' -i async-websocket.gemspec
22 sed -i '/bake-gem/d;/utopia-project/d' gems.rb
26 local _gemdir="$(gem env gemdir)"
28 gem build async-websocket.gemspec
32 --ignore-dependencies \
34 --install-dir "tmp_install/$_gemdir" \
35 --bindir "tmp_install/usr/bin" \
36 async-websocket-$pkgver.gem
37 find "tmp_install/$_gemdir/gems/" \
44 -iname "gem.build_complete" -o \
48 rm -r tmp_install/$_gemdir/cache
52 local _gemdir="$(gem env gemdir)"
54 GEM_HOME="tmp_install/$_gemdir" bake test
59 cp -a tmp_install/* "$pkgdir"/
60 install -Dm644 license.md -t "$pkgdir"/usr/share/licenses/$pkgname/