diff --git a/packages/ruby/3.0.1/build.sh b/packages/ruby/3.0.1/build.sh new file mode 100755 index 0000000..ab6b8a0 --- /dev/null +++ b/packages/ruby/3.0.1/build.sh @@ -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 + diff --git a/packages/ruby/3.0.1/environment b/packages/ruby/3.0.1/environment new file mode 100644 index 0000000..118cf33 --- /dev/null +++ b/packages/ruby/3.0.1/environment @@ -0,0 +1,4 @@ +#!/bin/bash + +# Path to ruby binary +export PATH=$PWD/bin:$PATH diff --git a/packages/ruby/3.0.1/metadata.json b/packages/ruby/3.0.1/metadata.json new file mode 100644 index 0000000..283cf71 --- /dev/null +++ b/packages/ruby/3.0.1/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "ruby", + "version": "3.0.1", + "aliases": ["ruby3", "rb"] +} diff --git a/packages/ruby/3.0.1/run b/packages/ruby/3.0.1/run new file mode 100644 index 0000000..55cca9c --- /dev/null +++ b/packages/ruby/3.0.1/run @@ -0,0 +1,4 @@ +#!/bin/bash + +# Run ruby script with args +ruby "$@" diff --git a/packages/ruby/3.0.1/test.rb b/packages/ruby/3.0.1/test.rb new file mode 100644 index 0000000..eb08579 --- /dev/null +++ b/packages/ruby/3.0.1/test.rb @@ -0,0 +1 @@ +puts("OK")