From d9410ddb7d6ed1b5dd0d35973361369a69412c97 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 31 Mar 2023 12:51:45 -0400 Subject: [PATCH] user/ruby3.0-webrick: new aport --- user/ruby3.0-webrick/APKBUILD | 58 ++++++++++++++++++++++++++++++ user/ruby3.0-webrick/gemspec.patch | 15 ++++++++ 2 files changed, 73 insertions(+) create mode 100644 user/ruby3.0-webrick/APKBUILD create mode 100644 user/ruby3.0-webrick/gemspec.patch diff --git a/user/ruby3.0-webrick/APKBUILD b/user/ruby3.0-webrick/APKBUILD new file mode 100644 index 0000000..6749052 --- /dev/null +++ b/user/ruby3.0-webrick/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: omni +# Maintainer: Jakub Jirutka +pkgname=ruby3.0-webrick +_gemname=webrick +pkgver=1.7.0 +pkgrel=0 +pkgdesc="HTTP server toolkit for Ruby" +url="https://github.com/ruby/webrick" +arch="noarch" +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 +" diff --git a/user/ruby3.0-webrick/gemspec.patch b/user/ruby3.0-webrick/gemspec.patch new file mode 100644 index 0000000..a21a0c5 --- /dev/null +++ b/user/ruby3.0-webrick/gemspec.patch @@ -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",