pkg(ruby-3.0.1): add ruby 3.0.1 (#242)

Co-authored-by: Vargas, Dan <dan.vargas@frostbank.com>
This commit is contained in:
Dan Vargas 2021-04-30 06:33:29 -05:00 committed by GitHub
parent 37946d8542
commit f2973f0536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 0 deletions

21
packages/ruby/3.0.1/build.sh vendored Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Download and extract ruby
curl "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.1.tar.gz" -o ruby.tar.gz
tar xzf ruby.tar.gz --strip-components=1
rm ruby.tar.gz
# Autoconf based
./configure --prefix "$PREFIX"
make -j$(nproc)
make install -j$(nproc)
# Cleanup
cd ..
rm -rf build

4
packages/ruby/3.0.1/environment vendored Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Path to ruby binary
export PATH=$PWD/bin:$PATH

5
packages/ruby/3.0.1/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "ruby",
"version": "3.0.1",
"aliases": ["ruby3", "rb"]
}

4
packages/ruby/3.0.1/run vendored Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Run ruby script with args
ruby "$@"

1
packages/ruby/3.0.1/test.rb vendored Normal file
View File

@ -0,0 +1 @@
puts("OK")