Date: Tuesday, October 18, 2022 @ 18:09:30
Author: felixonmars
Revision: 1332746
archrelease: copy trunk to community-any
Added:
ruby-nanotest/repos/community-any/
ruby-nanotest/repos/community-any/PKGBUILD
(from rev 1332745, ruby-nanotest/trunk/PKGBUILD)
----------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Copied: ruby-nanotest/repos/community-any/PKGBUILD (from rev 1332745,
ruby-nanotest/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2022-10-18 18:09:30 UTC (rev 1332746)
@@ -0,0 +1,61 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=ruby-nanotest
+pkgver=0.9.4.1
+pkgrel=1
+pkgdesc='Extremely mynymal test framework'
+arch=(any)
+url='https://github.com/mynyml/nanotest'
+license=(MIT)
+depends=(ruby)
+makedepends=(ruby-minitest)
+checkdepends=(ruby-rake)
+options=(!emptydirs)
+source=(https://github.com/mynyml/nanotest/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('8596cea1a553596cf71ff7dc866620e126e0e568946eb64f6ed41a356925ffbb')
+
+prepare() {
+ cd nanotest-$pkgver
+ # https://github.com/mynyml/nanotest/pull/3
+ sed 's/-rubygems //' -i Rakefile
+ # https://github.com/mynyml/nanotest/pull/4
+ sed 's/MiniTest::Unit::TestCase/MiniTest::Test/' -i test/test_nanotest.rb
+}
+
+build() {
+ local _gemdir="$(gem env gemdir)"
+ cd nanotest-$pkgver
+ gem build nanotest.gemspec
+ gem install \
+ --local \
+ --verbose \
+ --ignore-dependencies \
+ --no-user-install \
+ --install-dir "tmp_install/$_gemdir" \
+ --bindir "tmp_install/usr/bin" \
+ nanotest-$pkgver.gem
+ find "tmp_install/$_gemdir/gems/" \
+ -type f \
+ \( \
+ -iname "*.o" -o \
+ -iname "*.c" -o \
+ -iname "*.so" -o \
+ -iname "*.time" -o \
+ -iname "gem.build_complete" -o \
+ -iname "Makefile" \
+ \) \
+ -delete
+ rm -r tmp_install/$_gemdir/cache
+}
+
+check() {
+ local _gemdir="$(gem env gemdir)"
+ cd nanotest-$pkgver
+ GEM_HOME="tmp_install/$_gemdir" rake
+}
+
+package() {
+ cd nanotest-$pkgver
+ cp -a tmp_install/* "$pkgdir"/
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}