[arch-commits] Commit in (4 files)

Andreas Schleifer segaja at gemini.archlinux.org
Wed Aug 17 22:08:23 UTC 2022


    Date: Wednesday, August 17, 2022 @ 22:08:22
  Author: segaja
Revision: 1266769

ruby-cgi 0.3.2-1

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

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

Added: ruby-cgi/trunk/PKGBUILD
===================================================================
--- ruby-cgi/trunk/PKGBUILD	                        (rev 0)
+++ ruby-cgi/trunk/PKGBUILD	2022-08-17 22:08:22 UTC (rev 1266769)
@@ -0,0 +1,84 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='cgi'
+pkgname="ruby-${_gemname}"
+pkgver=0.3.2
+pkgrel=1
+pkgdesc='Support for the Common Gateway Interface protocol.'
+arch=('any')
+url="https://github.com/ruby/${_gemname}"
+license=('BSD' 'RUBY')
+depends=('ruby')
+makedepends=('ruby-rake-compiler')
+checkdepends=('ruby-rake')
+options=(!emptydirs)
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('8a92f58bb0d831a8786826d9755aeb2cc56241837a60893f730986da7cd3efb9b8b51f9eb1c42857fcbac30f0f15fee6cb93646b473585a0871c4b044a95061b')
+
+prepare() {
+  cd "${_gemname}-${pkgver}"
+
+  # update gemspec/Gemfile to allow newer version of the dependencies
+  sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
+
+  rm --verbose \
+    rakelib/changelogs.rake \
+    rakelib/epoch.rake
+}
+
+build() {
+  cd "${_gemname}-${pkgver}"
+
+  rake compile
+  rake build
+}
+
+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" \
+    "pkg/${_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