user/ruby3.0-minitest: new aport

This commit is contained in:
Antoine Martin 2023-03-31 12:52:28 -04:00 committed by Antoine Martin
parent e042e1cbf9
commit 404058c5b1
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,66 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby3.0-minitest
_gemname=minitest
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
pkgver=5.14.4
pkgrel=0
pkgdesc="Suite of testing facilities supporting TDD, BDD, mocking, and benchmarking for Ruby"
url="https://github.com/seattlerb/minitest"
arch="noarch"
license="MIT"
depends="ruby3.0"
makedepends="ruby3.0-rdoc"
subpackages="$pkgname-doc"
source="https://github.com/seattlerb/minitest/archive/v$pkgver/$_gemname-$pkgver.tar.gz
https://rubygems.org/downloads/$_gemname-$pkgver.gem
"
builddir="$srcdir/$_gemname-$pkgver"
prepare() {
default_prepare
# Generate gemspec (there's no gemspec in the source).
gem specification -l --ruby "$srcdir"/$_gemname-$pkgver.gem \
> "$builddir"/$_gemname.gemspec
}
build() {
gem build $_gemname.gemspec
}
check() {
ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))"
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
local geminstdir="$gemdir/gems/$_gemname-$pkgver"
gem install \
--local \
--install-dir "$gemdir" \
--ignore-dependencies \
--document ri \
--verbose \
$_gemname
# Remove unnessecary files
cd "$gemdir"
rm -rf build_info cache extensions plugins
cd "$geminstdir"
rm -rf History.* Manifest.* README.* Rakefile test/
}
doc() {
pkgdesc="$pkgdesc (ri docs)"
amove "$(ruby -e 'puts Gem.default_dir')"/doc
}
sha512sums="
e0b780d47e79adcfb68c2d521aa002ad00caefb5820d41d157cfcf34e2c9f987c76e4d31ba1a46b62b18a51c1e84c0add2637f30ab89899e511f3db7b2cea3e3 minitest-5.14.4.tar.gz
f967a11cfce82e167879905082859273b270e8d8e663a0c1c553964a345fb8564547627b8cf97418ac5bda544bb76c1385438ad74ec8e846666dc2952d55c9e9 minitest-5.14.4.gem
"

View file

@ -0,0 +1,15 @@
--- a/webrick.gemspec
+++ b/webrick.gemspec
@@ -14,12 +14,6 @@
s.require_path = %w{lib}
s.files = [
- "Gemfile",
- "LICENSE.txt",
- "README.md",
- "Rakefile",
- "bin/console",
- "bin/setup",
"lib/webrick.rb",
"lib/webrick/accesslog.rb",
"lib/webrick/cgi.rb",