[arch-commits] Commit in (4 files)

Andreas Schleifer segaja at gemini.archlinux.org
Wed Jan 19 22:22:23 UTC 2022


    Date: Wednesday, January 19, 2022 @ 22:22:23
  Author: segaja
Revision: 1110873

create ruby-psych 4.0.3-2

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

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

Added: ruby-psych/trunk/PKGBUILD
===================================================================
--- ruby-psych/trunk/PKGBUILD	                        (rev 0)
+++ ruby-psych/trunk/PKGBUILD	2022-01-19 22:22:23 UTC (rev 1110873)
@@ -0,0 +1,51 @@
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
+
+_gemname='psych'
+pkgname="ruby-${_gemname}"
+pkgver=4.0.3
+pkgrel=2
+pkgdesc="A YAML parser and emitter"
+arch=('x86_64')
+url="https://github.com/ruby/psych"
+license=('MIT')
+depends=('ruby' 'ruby-stringio')
+makedepends=('ruby-bundler' 'ruby-rake' 'ruby-rake-compiler')
+checkdepends=('ruby-test-unit')
+source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('3a65bd02e9d0e10fcd223327eead2328be091b2b00963adb59a6ce00a94db715457c6c82d7dc723eb1ba28723aeacf02d35e759b36300907d03633b9fdc2dc14')
+
+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}"
+
+  rake build
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+
+  rake test
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+
+  local _gemdir="$(gem env gemdir)"
+  local _platform="$(gem env platform | cut -d':' -f2)"
+  local _extension_api_version="$(ruby -e'puts Gem.extension_api_version')"
+
+  gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
+
+  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem" \
+      "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/ext/psych/Makefile" \
+      "${pkgdir}/${_gemdir}/extensions/${_platform}/${_extension_api_version}/${_gemname}-${pkgver}/gem_make.out"
+
+  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm 644 CONTRIBUTING.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list