ayaports/user/ruby3.2-power_assert/APKBUILD

62 lines
1.6 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby3.2-power_assert
_gemname=power_assert
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
pkgver=2.0.3
pkgrel=0
pkgdesc="Debug tool for Ruby that displays intermediate results of a method chain"
url="https://github.com/ruby/power_assert"
arch="noarch"
license="BSD-2-Clause AND Ruby"
depends="ruby3.2"
checkdepends="ruby3.2-pry ruby3.2-rake ruby3.2-test-unit"
makedepends="ruby3.2-rdoc"
subpackages="$pkgname-doc"
source="https://github.com/ruby/power_assert/archive/v$pkgver/$_gemname-$pkgver.tar.gz
gemspec.patch
"
builddir="$srcdir/$_gemname-$pkgver"
# Avoid circular dependency with ruby-test-unit.
options="!check"
prepare() {
default_prepare
sed -i '/require .bundler/d' Rakefile
}
build() {
gem build $_gemname.gemspec
}
check() {
rake test
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
gem install \
--local \
--install-dir "$gemdir" \
--ignore-dependencies \
--document ri \
--verbose \
$_gemname
# Remove unnessecary files
cd "$gemdir"
rm -rf build_info cache extensions plugins
}
doc() {
pkgdesc="$pkgdesc (ri docs)"
amove "$(ruby -e 'puts Gem.default_dir')"/doc
}
sha512sums="
f5658d18b3b78e7757ddfc1ccdabc011076c009a7343eaad2748ca7aeb4d112bf19c70621cb938e7dcf1582c8bb7c5512017885ea51503b3ed274980b7d7c0b1 power_assert-2.0.3.tar.gz
eb4321b8ce33476e21f0cd6da92f1f2be93e0892f5e6043d6d5f5578160f1793993b10645c0b06b3b2df3e8190a10c83e5325c367001e222d98b290222c2edfe gemspec.patch
"