From ffc381046ca56437827a66d5d00c945198406873 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Wed, 2 Nov 2022 16:38:19 -0400 Subject: [PATCH] +rubygems.org --- projects/ruby-lang.org/package.yml | 34 +++++++++++++++++++++++++++--- projects/rubygems.org/package.yml | 27 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 projects/rubygems.org/package.yml diff --git a/projects/ruby-lang.org/package.yml b/projects/ruby-lang.org/package.yml index 81c4d673..9be1b950 100644 --- a/projects/ruby-lang.org/package.yml +++ b/projects/ruby-lang.org/package.yml @@ -21,8 +21,36 @@ build: git-scm.org: 2 script: | git apply props/tolerant-shebang.diff - ./configure --prefix="{{prefix}}" + ./configure --prefix="{{prefix}}" --enable-load-relative make --jobs {{hw.concurrency}} install -test: - ruby -e 'puts "Hello World!"' \ No newline at end of file + cd "{{prefix}}"/bin + + # we provide these as `rubygems.org` + rm bundle bundler gem rake rbs rdbg typeprof + + for shim in $shims; do + sed -i.bak -e 's_#!{{prefix}}/bin/ruby_#!/usr/bin/env ruby_' $shim + rm $shim.bak + done + env: + shims: + - erb + - irb + - racc + - rdoc + - ri + +test: | + ruby -e 'puts "Hello World!"' + +provides: + - bin/erb + - bin/irb + - bin/racc + - bin/rdoc + - bin/ri + - bin/ruby + +companions: + rubygems.org: '*' diff --git a/projects/rubygems.org/package.yml b/projects/rubygems.org/package.yml new file mode 100644 index 00000000..ab29d093 --- /dev/null +++ b/projects/rubygems.org/package.yml @@ -0,0 +1,27 @@ +distributable: + url: https://github.com/rubygems/rubygems/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: rubygems/rubygems + +dependencies: + ruby-lang.org: '>=2.3' + +build: + script: | + ruby setup.rb --prefix={{prefix}} --env-shebang + +test: + script: | + gem install awesome_print + ruby -e 'require "awesome_print"' -e 'ap $LOAD_PATH' + +provides: + - bin/bundle + - bin/bundler + - bin/gem + - bin/rake + - bin/rbs + - bin/rdbg + - bin/typeprof