Date: Friday, October 7, 2022 @ 18:44:00
  Author: felixonmars
Revision: 1324289

addpkg: ruby-llhttp-ffi 0.4.0-1

Added:
  ruby-llhttp-ffi/
  ruby-llhttp-ffi/repos/
  ruby-llhttp-ffi/trunk/
  ruby-llhttp-ffi/trunk/PKGBUILD

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

Added: ruby-llhttp-ffi/trunk/PKGBUILD
===================================================================
--- ruby-llhttp-ffi/trunk/PKGBUILD                              (rev 0)
+++ ruby-llhttp-ffi/trunk/PKGBUILD      2022-10-07 18:44:00 UTC (rev 1324289)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=ruby-llhttp-ffi
+pkgver=0.4.0
+_commit=5f39877658b3dc23beb79201be502e2a71588be0
+pkgrel=1
+pkgdesc='Ruby FFI bindings for llhttp'
+arch=(x86_64)
+url='https://github.com/metabahn/llhttp/'
+license=(Apache)
+depends=(ruby-ffi-compiler ruby-rake)
+makedepends=(ruby-rake-compiler ruby-async-io ruby-rspec)
+options=(!emptydirs)
+source=(https://github.com/metabahn/llhttp/archive/$_commit/$pkgname-$_commit.tar.gz)
+sha256sums=('f7066210685972501a9ca3ad33d5b3a307bb5dad7b269573e19d56e1ab13afd5')
+
+build() {
+  local _gemdir="$(gem env gemdir)"
+  cd llhttp-$_commit/ffi
+  gem build llhttp-ffi.gemspec
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "tmp_install/$_gemdir" \
+    --bindir "tmp_install/usr/bin" \
+    llhttp-ffi-$pkgver.gem
+  find "tmp_install/$_gemdir/gems/" \
+    -type f \
+    \( \
+        -iname "*.o" -o \
+        -iname "*.c" -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 llhttp-$_commit/ffi
+  GEM_HOME="tmp_install/$_gemdir" rake test
+}
+
+package() {
+  cd llhttp-$_commit/ffi
+  cp -a tmp_install/* "$pkgdir"/
+}

Reply via email to