[arch-commits] Commit in ruby-test-unit/repos/community-any (PKGBUILD PKGBUILD)

Tim Meusel bastelfreak at archlinux.org
Sun May 16 14:38:24 UTC 2021


    Date: Sunday, May 16, 2021 @ 14:38:24
  Author: bastelfreak
Revision: 935837

archrelease: copy trunk to community-any

Added:
  ruby-test-unit/repos/community-any/PKGBUILD
    (from rev 935836, ruby-test-unit/trunk/PKGBUILD)
Deleted:
  ruby-test-unit/repos/community-any/PKGBUILD

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

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-16 14:38:15 UTC (rev 935836)
+++ PKGBUILD	2021-05-16 14:38:24 UTC (rev 935837)
@@ -1,24 +0,0 @@
-# Maintainer: 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>
-
-pkgname=ruby-test-unit
-pkgver=3.4.1
-pkgrel=1
-pkgdesc='An xUnit family unit testing framework for Ruby'
-arch=('any')
-url='https://github.com/test-unit/test-unit'
-license=('GPL')
-depends=('ruby-power_assert')
-makedepends=('ruby-rdoc')
-options=('!emptydirs')
-source=("https://rubygems.org/downloads/test-unit-$pkgver.gem")
-noextract=("test-unit-$pkgver.gem")
-sha512sums=('08c5877cf6ae80e6ef5de7c806dac74405329cd08a97431d174b756ad173e727a536fe315a624c5e1d5b071d5b887cb4b8498675f5f54073bdffe9d5ec4eb745')
-
-package() {
-  local _gemdir="$(ruby -e'puts Gem.default_dir')"
-  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" test-unit-$pkgver.gem
-  rm "$pkgdir/$_gemdir/cache/test-unit-$pkgver.gem"
-}

Copied: ruby-test-unit/repos/community-any/PKGBUILD (from rev 935836, ruby-test-unit/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-05-16 14:38:24 UTC (rev 935837)
@@ -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="ruby-${_gemname}"
+pkgver=3.4.1
+pkgrel=2
+pkgdesc='An xUnit family unit testing framework for Ruby'
+arch=('any')
+url="https://github.com/${_gemname}/${_gemname}"
+license=('GPL')
+depends=('ruby' 'ruby-power_assert')
+makedepends=('ruby-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 build "${_gemname}.gemspec"
+}
+
+check() {
+  cd "${_gemname}-${pkgver}"
+  ruby test/run-test.rb
+}
+
+package() {
+  cd "${_gemname}-${pkgver}"
+  local _gemdir="$(gem env gemdir)"
+  gem 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