Date: Tuesday, October 18, 2022 @ 02:19:14
  Author: felixonmars
Revision: 1331409

addpkg: ruby-protocol-http 0.23.12-1

Added:
  ruby-protocol-http/
  ruby-protocol-http/repos/
  ruby-protocol-http/trunk/
  ruby-protocol-http/trunk/PKGBUILD

----------+
 PKGBUILD |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Added: ruby-protocol-http/trunk/PKGBUILD
===================================================================
--- ruby-protocol-http/trunk/PKGBUILD                           (rev 0)
+++ ruby-protocol-http/trunk/PKGBUILD   2022-10-18 02:19:14 UTC (rev 1331409)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=ruby-protocol-http
+pkgver=0.23.12
+pkgrel=1
+pkgdesc='Provides abstractions to handle HTTP protocols'
+arch=(any)
+url='https://github.com/socketry/protocol-http'
+license=(MIT)
+depends=(ruby)
+makedepends=(ruby-rspec)
+checkdepends=(ruby-bake-test ruby-async-io ruby-async-rspec)
+options=(!emptydirs)
+source=(https://github.com/socketry/protocol-http/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('3846898818c42472590a739ae24be6b5134b3d5e851fa3a987996a10d465efdc')
+
+prepare() {
+  cd protocol-http-$pkgver
+  sed -r -e 's|~>|>=|g' -e '/covered/d' -e '/signing_key/d' -i 
protocol-http.gemspec spec/spec_helper.rb
+  sed -i 
'/bake-modernize/d;/bake-gem/d;/utopia-project/d;/bake-test-external/d' gems.rb
+}
+
+build() {
+  local _gemdir="$(gem env gemdir)"
+  cd protocol-http-$pkgver
+  gem build protocol-http.gemspec
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "tmp_install/$_gemdir" \
+    --bindir "tmp_install/usr/bin" \
+    protocol-http-$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 protocol-http-$pkgver
+  GEM_HOME="tmp_install/$_gemdir" bake test
+}
+
+package() {
+  cd protocol-http-$pkgver
+  cp -a tmp_install/* "$pkgdir"/
+}

Reply via email to