[arch-commits] Commit in (5 files)

Felix Yan felixonmars at gemini.archlinux.org
Sun Aug 28 12:23:23 UTC 2022


    Date: Sunday, August 28, 2022 @ 12:23:23
  Author: felixonmars
Revision: 1285078

addpkg: ruby-patron 0.13.3-1

Added:
  ruby-patron/
  ruby-patron/repos/
  ruby-patron/trunk/
  ruby-patron/trunk/PKGBUILD
  ruby-patron/trunk/ruby-patron-puma-5.patch

--------------------------+
 PKGBUILD                 |   62 +++++++++++++++++++++++++++++++++++++++++++++
 ruby-patron-puma-5.patch |   22 +++++++++++++++
 2 files changed, 84 insertions(+)

Added: ruby-patron/trunk/PKGBUILD
===================================================================
--- ruby-patron/trunk/PKGBUILD	                        (rev 0)
+++ ruby-patron/trunk/PKGBUILD	2022-08-28 12:23:23 UTC (rev 1285078)
@@ -0,0 +1,62 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=ruby-patron
+pkgver=0.13.3
+pkgrel=1
+pkgdesc='Ruby HTTP client library based on libcurl'
+arch=(x86_64)
+url='https://github.com/toland/patron'
+license=(MIT)
+depends=(ruby curl)
+makedepends=(ruby-rake-compiler ruby-rack ruby-rspec ruby-puma ruby-yard)
+options=(!emptydirs)
+source=(https://github.com/toland/patron/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+        $pkgname-puma-5.patch)
+sha256sums=('4ae57af4ea6d0eaaa5ccdbf78f6b3a0157109a7d7d2a72c7b048a16af9ef771a'
+            '85977d0082234adb7b31308c4338f870a6ae30c3f2182c81d7c1736c33c0dc25')
+
+prepare() {
+  cd patron-$pkgver
+  patch -p1 -i ../$pkgname-puma-5.patch
+  # we don't do version pinning
+  sed -r -e 's|~>|>=|g' -e 's|git ls-files -z|find . -print0|' -i patron.gemspec
+}
+
+build() {
+  local _gemdir="$(gem env gemdir)"
+  cd patron-$pkgver
+  rake build
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "tmp_install/$_gemdir" \
+    --bindir "tmp_install/usr/bin" \
+    pkg/patron-$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
+}
+
+check() {
+  local _gemdir="$(gem env gemdir)"
+  cd patron-$pkgver
+  # https://github.com/toland/patron/pull/193
+  GEM_HOME="tmp_install/$_gemdir" rake spec || echo "Tests failed"
+}
+
+package() {
+  cd patron-$pkgver
+  cp -a tmp_install/* "$pkgdir"/
+
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Added: ruby-patron/trunk/ruby-patron-puma-5.patch
===================================================================
--- ruby-patron/trunk/ruby-patron-puma-5.patch	                        (rev 0)
+++ ruby-patron/trunk/ruby-patron-puma-5.patch	2022-08-28 12:23:23 UTC (rev 1285078)
@@ -0,0 +1,22 @@
+From 213e722fd5b7eac4b633ce0247034ae1905c39b2 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at archlinux.org>
+Date: Sun, 28 Aug 2022 12:17:13 +0300
+Subject: [PATCH] Update to puma 5
+
+---
+ patron.gemspec              | 2 +-
+ spec/support/test_server.rb | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/spec/support/test_server.rb b/spec/support/test_server.rb
+index b88aa43..ef8148c 100644
+--- a/spec/support/test_server.rb
++++ b/spec/support/test_server.rb
+@@ -21,6 +21,6 @@ def self.start(ssl = false, port = 9001 )
+     else
+       '0.0.0.0'
+     end
+-    Rack::Handler::Puma.run(APP, {:Port => port.to_i, :Verbose => true, :Host => host})
++    Rack::Handler::Puma.run(APP, :Port => port.to_i, :Verbose => true, :Host => host)
+   end
+ end



More information about the arch-commits mailing list