const path = require('path'); module.exports = { tags: async (tln) => [], dotenvs: async (tln) => [], env: async (tln, env) => { env.CMAKE_HOME = env.TLN_COMPONENT_HOME; env.PATH = [path.join(env.TLN_COMPONENT_HOME, 'bin'), env.PATH].join(path.delimiter); }, options: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'version', 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) { script.set([` echo [cmake] && cmake --version `]); } }}, { 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)) { script.set(tln.getDownloadScript(tln, { linux: { name: `cmake-${version}-linux-x86_64.tar.gz`, opts: { src: `cmake-${version}-linux-x86_64`, flt: `*`, dest: `.`, rmv: `cmake-${version}-linux-x86_64` }, url: `https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-linux-x86_64.tar.gz` }, darwin: { name: `cmake-${version}-macos10.10-universal.tar.gz`, opts: { src: `cmake-${version}-macos10.10-universal/CMake.app/Contents`, flt:`*`, dest: '.', rmv: `cmake-${version}-macos10.10-universal.tar.gz` }, url: `https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-macos10.10-universal.tar.gz` }, win32: { name: `cmake-${version}-windows-x86_64.zip`, opts: { src: `cmake-${version}-windows-x86_64`, flt: `*`, dest: `.`, rmv: `cmake-${version}-windows-x86_64` }, url: `https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-windows-x86_64.zip` } })); } } } ], components: async (tln) => require('./components.js') }