const path = require('path'); module.exports = { tags: async (tln) => [], dotenvs: async (tln) => [], env: async (tln, env) => { env.RUBY_HOME = env.TLN_COMPONENT_HOME; env.PATH = [path.join(env.TLN_COMPONENT_HOME, 'dist', 'bin'), env.PATH].join(path.delimiter); }, options: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'build', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); script.set([` ./configure --prefix=${path.join(script.env.TLN_COMPONENT_HOME, 'dist')} make make install `]); } }, { id: 'install', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { const mmVersion = version.split('.').slice(0,2).join('.'); script.set(tln.getDownloadScript(tln, { linux: { name: `ruby-${version}.zip`, opts: { src: `ruby-${version}`, flt: `*`, dest: `.`, rmv: `ruby-${version}` }, url: `https://cache.ruby-lang.org/pub/ruby/${mmVersion}/ruby-${version}.zip` }, darwin: { name: `ruby-${version}.zip`, opts: { src: `ruby-${version}`, flt: `*`, dest: `.`, rmv: `ruby-${version}` }, url: `https://cache.ruby-lang.org/pub/ruby/${mmVersion}/ruby-${version}.zip` }, win32: { name: `ruby-${version}.zip`, opts: { src: `ruby-${version}`, flt: `*`, dest: `.`, rmv: `ruby-${version}` }, url: `https://cache.ruby-lang.org/pub/ruby/${mmVersion}/ruby-${version}.zip` } })); } } } ], components: async (tln) => require('./components.js') }