1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

main/ruby-repl_type_completor: new aport (needed for main/ruby)

This commit is contained in:
Jakub Jirutka 2024-12-29 12:48:51 +01:00
parent f9b9c5d98f
commit dcb4511d9b
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,58 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-repl_type_completor
_gemname=repl_type_completor
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
pkgver=0.1.9
pkgrel=0
pkgdesc="Type based completion for REPL"
url="https://github.com/ruby/repl_type_completor"
arch="noarch"
license="BSD-2-Clause AND Ruby"
depends="ruby ruby-rbs"
makedepends="ruby-rdoc"
checkdepends="
ruby-test-unit
ruby-test-unit-ruby-core
"
subpackages="$pkgname-doc"
source="https://github.com/ruby/repl_type_completor/archive/v$pkgver/$_gemname-$pkgver.tar.gz
gemspec.patch
"
builddir="$srcdir/$_gemname-$pkgver"
build() {
gem build $_gemname.gemspec
}
check() {
ruby -I lib -e "Dir.glob('./test/**/test_*.rb', &method(:require))" -- --verbose
}
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="
c3c88a4127fc37614c8e651b81cbc0636684f2feddd1032f2e4a060b7a6b341d758f64afcb14e8cbfe59306caeba528fb97343cba424d4612f23e095d5486a9e repl_type_completor-0.1.9.tar.gz
cc2fc4fd6337a86099f40ca2028743aa44ece4bd3586a6cbeba194aac94ca55fffd467b89434c7bad9b457de32c68857afb3ef7267413b3efea94524028df53f gemspec.patch
"

View file

@ -0,0 +1,10 @@
--- a/repl_type_completor.gemspec
+++ b/repl_type_completor.gemspec
@@ -22,6 +22 @@
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
- spec.files = Dir.chdir(__dir__) do
- `git ls-files -z`.split("\x0").reject do |f|
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
- end
- end
+ spec.files = Dir["lib/**/*.rb", "sig/**/*"]