ayaports/user/ruby3.0-webrick/APKBUILD

63 lines
1.5 KiB
Text
Raw Normal View History

2023-03-31 20:26:25 +00:00
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
2023-03-31 16:51:45 +00:00
# Contributor: omni <omni+alpine@hack.org>
2023-03-31 20:26:25 +00:00
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
2023-03-31 16:51:45 +00:00
pkgname=ruby3.0-webrick
_gemname=webrick
pkgver=1.7.0
2023-03-31 20:26:25 +00:00
pkgrel=1
2023-03-31 16:51:45 +00:00
pkgdesc="HTTP server toolkit for Ruby"
url="https://github.com/ruby/webrick"
2023-11-23 16:37:50 +00:00
# blocked by ruby3.0
#arch="noarch"
2023-03-31 16:51:45 +00:00
license="BSD-2-Clause"
depends="ruby3.0"
checkdepends="ruby3.0-rake ruby3.0-test-unit"
makedepends="ruby3.0-rdoc"
subpackages="$pkgname-doc"
source="https://github.com/ruby/webrick/archive/v$pkgver/ruby-webrick-$pkgver.tar.gz
gemspec.patch
"
builddir="$srcdir/$_gemname-$pkgver"
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="
785e8c6af6e2f8ac497bab6d0ad0e9383fa4c4ac8dee6ceee38e20c5e9b631b805ec3c8f5438ebea651ee4113698de1a370ae506927bdc04e512ea6cac433cd1 ruby-webrick-1.7.0.tar.gz
ddfd7ec0b7b4c7b2dea9d3ed45f8a8353bbbb7c61f5c11a9c52116402fcba8626a446dcf18b9fee1ac9a267ccc3b534a1dbd113d02959e612f034b15b47a786e gemspec.patch
"