1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
6 pkgdesc='A fast, asynchronous, rack-compatible web server'
8 url='https://github.com/socketry/falcon'
10 depends=(ruby-async ruby-async-container ruby-async-http ruby-async-http ruby-async-http-cache
11 ruby-async-io ruby-build-environment ruby-localhost ruby-process-metrics ruby-protocol-rack
13 checkdepends=(ruby-async-process ruby-async-rspec ruby-async-websocket ruby-bake ruby-covered
14 ruby-rspec ruby-bake-test ruby-bake-test-external ruby-puma)
16 source=(https://github.com/socketry/falcon/archive/v$pkgver/$pkgname-$pkgver.tar.gz
17 https://github.com/socketry/falcon/commit/e93d153d53faf42710d7a2890425b6b77e188914.patch)
18 sha256sums=('d43ce8a64d0c95e5d783738142374b11586e51cbe6aea0da3cb6d4be47e2c7d5'
19 '3238b59daf1c7c62a59c0f86188e73745252be962098d7cb67655ca083577113')
23 # Revert for openssl < 3.0 support
24 patch -Rp1 -i ../e93d153d53faf42710d7a2890425b6b77e188914.patch
25 sed -r -e 's|~>|>=|g' -e '/signing_key/d' -i falcon.gemspec
26 sed -i '/bake-gem/d;/bake-modernize/d;/bake-github-pages/d;/utopia-project/d;/ruby-prof/d' gems.rb
30 local _gemdir="$(gem env gemdir)"
32 gem build falcon.gemspec
36 --ignore-dependencies \
38 --install-dir "tmp_install/$_gemdir" \
39 --bindir "tmp_install/usr/bin" \
41 find "tmp_install/$_gemdir/gems/" \
48 -iname "gem.build_complete" -o \
52 rm -r tmp_install/$_gemdir/cache
56 local _gemdir="$(gem env gemdir)"
58 GEM_HOME="tmp_install/$_gemdir" bake test
63 cp -a tmp_install/* "$pkgdir"/
64 install -Dm644 license.md -t "$pkgdir"/usr/share/licenses/$pkgname/