[arch-commits] Commit in ruby-psych/repos (community-x86_64 community-x86_64/PKGBUILD)
Andreas Schleifer
segaja at gemini.archlinux.org
Wed Jan 19 22:23:45 UTC 2022
Date: Wednesday, January 19, 2022 @ 22:23:45
Author: segaja
Revision: 1110875
archrelease: copy trunk to community-x86_64
Added:
ruby-psych/repos/community-x86_64/
ruby-psych/repos/community-x86_64/PKGBUILD
(from rev 1110874, ruby-psych/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: ruby-psych/repos/community-x86_64/PKGBUILD (from rev 1110874, ruby-psych/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-01-19 22:23:45 UTC (rev 1110875)
@@ -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