[arch-commits] Commit in (4 files)

Andreas Schleifer segaja at gemini.archlinux.org
Thu Aug 18 20:46:00 UTC 2022


    Date: Thursday, August 18, 2022 @ 20:46:00
  Author: segaja
Revision: 1268894

ruby-drb 2.1.0-1

Added:
  ruby-drb/
  ruby-drb/repos/
  ruby-drb/trunk/
  ruby-drb/trunk/PKGBUILD

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

Added: ruby-drb/trunk/PKGBUILD
===================================================================
--- ruby-drb/trunk/PKGBUILD	                        (rev 0)
+++ ruby-drb/trunk/PKGBUILD	2022-08-18 20:46:00 UTC (rev 1268894)
@@ -0,0 +1,78 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='drb'
+pkgname="ruby-${_gemname}"
+pkgver=2.1.0
+pkgrel=1
+pkgdesc='Distributed object system for Ruby'
+arch=('any')
+url="https://github.com/ruby/${_gemname}"
+license=('BSD' 'RUBY')
+depends=('ruby' 'ruby-ruby2_keywords')
+checkdepends=('ruby-rake')
+options=(!emptydirs)
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('d769d3527c54cd6e9bca2dd07e3332cb0fcbc4d6fc0ad32b0ffb83e8c31e0f8423dcd34863ad126b970aab0e6245fa16dbf7949253c613e5a02cbf30f8a650da')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # update gemspec/Gemfile to allow newer version of the dependencies
+  sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+
+  gem build "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+
+  rake test
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+
+  local _gemdir="$(gem env gemdir)"
+
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "${pkgdir}/${_gemdir}" \
+    --bindir "${pkgdir}/usr/bin" \
+    "${_gemname}-${pkgver}.gem"
+
+  # remove unrepreducible files
+  rm --force --recursive --verbose \
+    "${pkgdir}/${_gemdir}/cache/" \
+    "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
+    "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
+
+  find "${pkgdir}/${_gemdir}/gems/" \
+    -type f \
+    \( \
+      -iname "*.o" -o \
+      -iname "*.c" -o \
+      -iname "*.so" -o \
+      -iname "*.time" -o \
+      -iname "gem.build_complete" -o \
+      -iname "Makefile" \
+    \) \
+    -delete
+
+  find "${pkgdir}/${_gemdir}/extensions/" \
+    -type f \
+    \( \
+      -iname "mkmf.log" -o \
+      -iname "gem_make.out" \
+    \) \
+    -delete
+
+  install -D --mode=644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D --mode=644 README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list