[arch-commits] Commit in (4 files)

Tim Meusel bastelfreak at archlinux.org
Sun May 16 15:04:47 UTC 2021


    Date: Sunday, May 16, 2021 @ 15:04:47
  Author: bastelfreak
Revision: 935842

add ruby27-test-unit

Added:
  ruby27-test-unit/
  ruby27-test-unit/repos/
  ruby27-test-unit/trunk/
  ruby27-test-unit/trunk/PKGBUILD

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

Added: ruby27-test-unit/trunk/PKGBUILD
===================================================================
--- ruby27-test-unit/trunk/PKGBUILD	                        (rev 0)
+++ ruby27-test-unit/trunk/PKGBUILD	2021-05-16 15:04:47 UTC (rev 935842)
@@ -0,0 +1,48 @@
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Anatol Pomozov <anatol.pomozov at gmail.com>
+# Contributor: Alfredo Palhares <masterkorp at masterkorp.net>
+# Contributor: Jochen Schalanda <jochen+aur at schalanda.name>
+
+_gemname=test-unit
+pkgname="ruby27-${_gemname}"
+pkgver=3.4.1
+pkgrel=1
+pkgdesc='An xUnit family unit testing framework for Ruby'
+arch=('any')
+url="https://github.com/${_gemname}/${_gemname}"
+license=('GPL')
+depends=('ruby2.7' 'ruby27-power_assert')
+makedepends=('ruby27-rdoc')
+options=('!emptydirs')
+source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('505262c6100fc43496c6b831cc22a98dd73351787c73903e6d2e776ad2987b5d5010c0d7e3bc568486825578aa8a2c69cf9d99cb3da655bf79424ab2f92baa94')
+
+# fix wrong license identifier to match the official ones from https://spdx.org/licenses/
+prepare() {
+  cd "${_gemname}-${pkgver}"
+  sed --in-place 's/spec.licenses.*/spec.licenses = ["BSD-2-Clause", "PSF-2.0", "Ruby"]/' "${_gemname}.gemspec"
+}
+
+build() {
+ cd "${_gemname}-${pkgver}"
+ gem-2.7 build "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+  ruby-2.7 test/run-test.rb
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+  local _gemdir="$(gem-2.7 env gemdir)"
+  gem-2.7 install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
+
+  rm -rf "${pkgdir}/${_gemdir}/cache"
+
+  install -Dm 644 README.md doc/text/* -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -Dm 644 BSDL COPYING PSFL -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list