diff options
| author | mo khan <mo.khan@gmail.com> | 2020-08-04 14:51:49 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-08-04 18:18:36 -0600 |
| commit | 4b130604be2dcd96bde5f708e0f4dc91f86bd89b (patch) | |
| tree | b8333834b2be76fdd357a22fcda7212909e32eef /config/software | |
| parent | ed6e39123472fecf4eb8fef1e75db28a3b4d1ff2 (diff) | |
Build debian packages for tools
Diffstat (limited to 'config/software')
| -rw-r--r-- | config/software/asdf.rb | 47 | ||||
| -rw-r--r-- | config/software/asdf_dotnet_sdk.rb | 24 | ||||
| -rw-r--r-- | config/software/asdf_golang.rb | 16 | ||||
| -rw-r--r-- | config/software/asdf_gradle.rb | 16 | ||||
| -rw-r--r-- | config/software/asdf_java.rb | 46 | ||||
| -rw-r--r-- | config/software/asdf_maven.rb | 17 | ||||
| -rw-r--r-- | config/software/asdf_mono.rb | 40 | ||||
| -rw-r--r-- | config/software/asdf_nodejs.rb | 28 | ||||
| -rw-r--r-- | config/software/asdf_php.rb | 37 | ||||
| -rw-r--r-- | config/software/asdf_python.rb | 99 | ||||
| -rw-r--r-- | config/software/asdf_ruby.rb | 75 | ||||
| -rw-r--r-- | config/software/asdf_rust.rb | 28 | ||||
| -rw-r--r-- | config/software/libsqlite3.rb | 22 | ||||
| -rw-r--r-- | config/software/license_management.rb | 25 | ||||
| -rw-r--r-- | config/software/ruby.rb | 7 |
15 files changed, 520 insertions, 7 deletions
diff --git a/config/software/asdf.rb b/config/software/asdf.rb new file mode 100644 index 0000000..1b5ba26 --- /dev/null +++ b/config/software/asdf.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +name "asdf" +default_version "v0.7.8" + +source git: "https://github.com/asdf-vm/asdf.git" +relative_path "asdf-#{version}" + +env = with_embedded_path.merge('ASDF_DATA_DIR' => install_dir) +env['PATH'] = "#{install_dir}/shims:#{env['PATH']}" + +build do + sync project_dir, install_dir + command "echo 'always_keep_download = yes' >> #{install_dir}/defaults", env: env + command "echo 'legacy_version_file = yes' >> #{install_dir}/defaults", env: env + command "echo 'use_release_candidates = no' >> #{install_dir}/defaults", env: env +end + +build do + command "asdf plugin list all", env: env + command "asdf plugin-add dotnet-core", env: env + command "asdf plugin-add elixir", env: env + command "asdf plugin-add golang", env: env + command "asdf plugin-add gradle", env: env + command "asdf plugin-add java", env: env + command "asdf plugin-add maven", env: env + command "asdf plugin-add nodejs", env: env + command "asdf plugin-add php", env: env + command "asdf plugin-add python", env: env + command "asdf plugin-add ruby", env: env + command "asdf plugin-add rust", env: env + command "asdf plugin-add sbt", env: env +end + +build do + command "asdf install elixir 1.10.4", env: env + command "asdf install sbt 1.3.8", env: env + # trigger download of pyenv + command "asdf list-all python", env: env + # trigger download of java cached file list + command "asdf list-all java", env: env.merge('CACHE_DIR' => install_dir) + command "asdf reshim", env: env +end + +build do + delete "#{install_dir}/installs/elixir/**/man" +end diff --git a/config/software/asdf_dotnet_sdk.rb b/config/software/asdf_dotnet_sdk.rb new file mode 100644 index 0000000..0d29611 --- /dev/null +++ b/config/software/asdf_dotnet_sdk.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +name "asdf_dotnet_sdk" +default_version "3.1.302" +whitelist_file(%r{shared/.*/.*\.so\z}) + +dependency "curl" +dependency "libffi" +dependency "zlib" + +source url: "https://dotnetcli.azureedge.net/dotnet/Sdk/#{version}/dotnet-sdk-#{version}-linux-x64.tar.gz" +relative_path "" + +version "3.1.302" do + source sha256: "777f376b65974e459e8804671461747c53b4eb6917f3e28db2cf6f9ed4be23c8" +end +version "3.1.301" do + source sha256: "a0c416bb57f7e16a4767e7cd4dbeab80386fffc354ee7cdc68d367694bc40269" +end + +build do + mkdir install_dir + sync "#{project_dir}/", install_dir +end diff --git a/config/software/asdf_golang.rb b/config/software/asdf_golang.rb new file mode 100644 index 0000000..d8240b0 --- /dev/null +++ b/config/software/asdf_golang.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +name "asdf_golang" +default_version "1.14.6" + +source url: "https://golang.org/dl/go#{version}.linux-amd64.tar.gz" +relative_path "go" + +version "1.14.6" do + source sha256: "5c566ddc2e0bcfc25c26a5dc44a440fcc0177f7350c1f01952b34d5989a0d287" +end + +build do + mkdir install_dir + sync "#{project_dir}/", install_dir +end diff --git a/config/software/asdf_gradle.rb b/config/software/asdf_gradle.rb new file mode 100644 index 0000000..d35972c --- /dev/null +++ b/config/software/asdf_gradle.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +name "asdf_gradle" +default_version "6.5.1" + +source url: "https://services.gradle.org/distributions/gradle-#{version}-bin.zip" +relative_path "gradle-#{version}" + +version "6.5.1" do + source sha256: "50a7d30529fa939721fe9268a0205142f3f2302bcac5fb45b27a3902e58db54a" +end + +build do + mkdir install_dir + copy "#{project_dir}/**", "#{install_dir}/" +end diff --git a/config/software/asdf_java.rb b/config/software/asdf_java.rb new file mode 100644 index 0000000..dc8cb15 --- /dev/null +++ b/config/software/asdf_java.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +name "asdf_java" +default_version "11" + +dependency "asdf_maven" +dependency "asdf_gradle" +dependency "zlib" + +whitelist_file "bin" +whitelist_file "lib" +whitelist_file "jre/bin" +whitelist_file "jre/lib" + +version "8" do + relative_path "jdk8u262-b10" + source( + url: "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u262-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u262b10.tar.gz", + sha256: "733755fd649fad6ae91fc083f7e5a5a0b56410fb6ac1815cff29f744b128b1b1" + ) +end + +version "11" do + relative_path "jdk-11.0.8+10" + source( + url: "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz", + sha256: "6e4cead158037cb7747ca47416474d4f408c9126be5b96f9befd532e0a762b47" + ) +end + +version "14" do + relative_path "jdk-14.0.2+12" + source( + url: "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz", + sha256: "7d5ee7e06909b8a99c0d029f512f67b092597aa5b0e78c109bd59405bbfa74fe" + ) +end + +build do + mkdir install_dir + copy "#{project_dir}/**", "#{install_dir}/" + delete "#{install_dir}/lib/ext" + delete "#{install_dir}/man" + delete "#{install_dir}/sample" + delete "#{install_dir}/src.zip" +end diff --git a/config/software/asdf_maven.rb b/config/software/asdf_maven.rb new file mode 100644 index 0000000..da63722 --- /dev/null +++ b/config/software/asdf_maven.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +name "asdf_maven" +default_version "3.6.3" + +major = version.split('.')[0] +source url: "https://archive.apache.org/dist/maven/maven-#{major}/#{version}/binaries/apache-maven-#{version}-bin.tar.gz" +relative_path "apache-maven-#{version}" + +version "3.6.3" do + source sha256: "26ad91d751b3a9a53087aefa743f4e16a17741d3915b219cf74112bf87a438c5" +end + +build do + mkdir install_dir + copy "#{project_dir}/**", "#{install_dir}/" +end diff --git a/config/software/asdf_mono.rb b/config/software/asdf_mono.rb new file mode 100644 index 0000000..f45521d --- /dev/null +++ b/config/software/asdf_mono.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +name "asdf_mono" +default_version "6.8.0.123" +license_file "LICENSE" +license_file "COPYING" + +dependency "zlib" + +source url: "https://download.mono-project.com/sources/mono/mono-#{version}.tar.xz" +relative_path "mono-#{version}" + +version("6.8.0.123") do + source sha256: 'e2e42d36e19f083fc0d82f6c02f7db80611d69767112af353df2f279744a2ac5' +end + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--disable-crash-reporting", + # "--enable-minimal=profiler,decimal,pinvoke,debug,appdomains,verifier,reflection_emit,reflection_emit_save,large_code,logging,com,ssa,generics,attach,interpreter,simd,soft_debug,perfcounters,normalization,desktop_loader,shared_perfcounters,remoting,security,lldb,mdb,assert_messages,cleanup,sgen_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_debug_helpers,sockets,gac", + "--enable-small-config", + "--with-crash-privacy=yes", + "--with-libgdiplus=sibling", + "--with-moonlight=no", + "--with-x=no", + "--with-mcs-docs=no", + "--prefix=#{install_dir}" + ] + env['CFLAGS'] << ' -Os' + + configure(*configure_command, env: env) + make "-j #{workers}", env: env + make "-j #{workers} install", env: env +end + +build do + command "curl -o #{install_dir}/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" + copy "#{install_dir}/bin/nuget.exe", "#{install_dir}/bin/nuget" +end diff --git a/config/software/asdf_nodejs.rb b/config/software/asdf_nodejs.rb new file mode 100644 index 0000000..3ad55c5 --- /dev/null +++ b/config/software/asdf_nodejs.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +name "asdf_nodejs" +default_version "12.18.2" + +source url: "https://nodejs.org/dist/v#{version}/node-v#{version}-linux-x64.tar.gz" +relative_path "node-v#{version}-linux-x64" + +version "12.18.2" do + source sha256: "2d316e55994086e41761b0c657e0027e9d16d7160d3f8854cc9dc7615b99a526" +end +version "10.21.0" do + source sha256: "d0bac246001eed9268ba9cadbfc6cfd8b6eb0728ad000a0f9fa7ce29e66c2be4" +end + +build do + mkdir install_dir + sync "#{project_dir}/", install_dir + touch "#{install_dir}/.npm/.keep" +end + +build do + command "#{install_dir}/bin/node #{install_dir}/bin/npm install -g bower bower-npm-resolver npm npm-install-peers yarn" +end + +build do + delete "#{install_dir}/share" +end diff --git a/config/software/asdf_php.rb b/config/software/asdf_php.rb new file mode 100644 index 0000000..3225ac8 --- /dev/null +++ b/config/software/asdf_php.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +name "asdf_php" +default_version "7.4.8" +license_file "LICENSE" + +dependency "autoconf" +dependency "libtool" +dependency "libxml2" +dependency "openssl" +dependency "zlib" +dependency "libsqlite3" + +source url: "https://www.php.net/distributions/php-#{version}.tar.gz" +relative_path "php-#{version}" + +version("7.4.8") { source sha256: "649f6bcdb60dc38d5edd7f3a7b2905d15d88c1d13e40307e8972ede347cea6ba" } + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--prefix=#{install_dir}", + "--with-openssl=#{install_dir}/embedded" + ] + configure(*configure_command, env: env) + make "-j #{workers}", env: env + make "-j #{workers} install", env: env +end + +build do + command "curl https://getcomposer.org/installer -o #{project_dir}/composer-setup.php" + command "#{install_dir}/bin/php #{project_dir}/composer-setup.php --install-dir=#{install_dir}/bin --filename=composer" +end + +build do + delete "#{install_dir}/embedded/bin/sqlite3" +end diff --git a/config/software/asdf_python.rb b/config/software/asdf_python.rb new file mode 100644 index 0000000..5a0e9c9 --- /dev/null +++ b/config/software/asdf_python.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +name "asdf_python" +default_version "3.8.5" + +dependency "bzip2" +dependency "libffi" +dependency "liblzma" +dependency "libsqlite3" +dependency "libuuid" +dependency "libyaml" +dependency "ncurses" +dependency "openssl" +dependency "zlib" + +source url: "https://python.org/ftp/python/#{version}/Python-#{version}.tar.xz" +relative_path "Python-#{version}" + +version("3.8.5") { source md5: "35b5a3d0254c1c59be9736373d429db7" } +version("3.8.4") { source md5: "e16df33cd7b58702e57e137f8f5d13e7" } +version("3.8.3") { source md5: "3000cf50aaa413052aef82fd2122ca78" } +version("3.8.2") { source md5: "e9d6ebc92183a177b8e8a58cad5b8d67" } +version("3.8.1") { source md5: "b3fb85fd479c0bf950c626ef80cacb57" } +version("3.8.0") { source md5: "dbac8df9d8b9edc678d0f4cacdb7dbb0" } +version("3.7.7") { source md5: "172c650156f7bea68ce31b2fd01fa766" } +version("3.7.6") { source md5: "c08fbee72ad5c2c95b0f4e44bf6fd72c" } +version("3.7.5") { source md5: "08ed8030b1183107c48f2092e79a87e2" } +version("3.7.4") { source md5: "d33e4aae66097051c2eca45ee3604803" } +version("3.7.3") { source md5: "93df27aec0cd18d6d42173e601ffbbfd" } +version("3.7.2") { source md5: "df6ec36011808205beda239c72f947cb" } +version("3.7.1") { source md5: "0a57e9022c07fad3dadb2eef58568edb" } +version("3.7.0") { source md5: "eb8c2a6b1447d50813c02714af4681f3" } +version("3.6.11") { source md5: "8f91c770b546a4938efbdb3064796c6c" } +version("3.5.9") { source md5: "ef7f82485e83c7f8f8bcb920a9c2457b" } +version("3.4.10") { source md5: "f88a98bce17a03c43a6a5f8a66ab2e62" } +version("3.3.7") { source md5: "84e2f12f044ca53b577f6224c53f82ac" } +version("3.2.6") { source md5: "e0ba4360dfcb4aec735e666cc0ae7b0e" } +version("3.1.5") { source md5: "20dd2b7f801dc97db948dd168df4dd52" } +version("3.0.1") { source md5: "7291eac6a9a7a3642e309c78b8d744e5" } + +version("2.7.18") { source md5: "fd6cc8ec0a78c44036f825e739f36e5a" } + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--enable-shared", + "--enable-ipv6", + "--prefix=#{install_dir}/embedded", + "--with-ssl=#{install_dir}/embedded", + "--with-dbmliborder=", + "--without-dtrace", + "--without-valgrind" + ] + configure(*configure_command, env: env) + make "-j #{workers}", env: env + make "-j #{workers} install", env: env + command "ln -s #{install_dir}/embedded/bin #{install_dir}/bin" +end + +build do + if version.start_with?('3.') + command "ln -s #{install_dir}/bin/python3 #{install_dir}/bin/python" + command "ln -s #{install_dir}/bin/pip3 #{install_dir}/bin/pip" + end + + if File.exist?("#{install_dir}/bin/pip") + command "#{install_dir}/bin/pip install --upgrade pip" + else + case version + when /^3\.2\./ + command "curl https://bootstrap.pypa.io/3.2/get-pip.py -o #{project_dir}/get-pip.py" + when /^3\.3\./ + command "curl https://bootstrap.pypa.io/3.3/get-pip.py -o #{project_dir}/get-pip.py" + when /^3\.4\./ + command "curl https://bootstrap.pypa.io/3.4/get-pip.py -o #{project_dir}/get-pip.py" + when /^2\.6\./ + command "curl https://bootstrap.pypa.io/2.6/get-pip.py -o #{project_dir}/get-pip.py" + else + command "curl https://bootstrap.pypa.io/get-pip.py -o #{project_dir}/get-pip.py" + end + + command "#{install_dir}/bin/python #{project_dir}/get-pip.py \"pip<20.0\"" + end + command "#{install_dir}/bin/pip install pipenv virtualenv" + command "#{install_dir}/bin/pip install conan" if version == default_version +end + +build do + command "find #{install_dir} -type f -name '*.exe' -exec rm {} +" + command "find #{install_dir} -type d -name '__pycache__' -exec rm -r {} +" + command "find #{install_dir} -type d -name 'test' -exec rm -r {} +" + command "find #{install_dir} -type d -name 'tests' -exec rm -r {} +" + delete "#{install_dir}/embedded/bin/sqlite3" + delete "#{install_dir}/embedded/lib/python*/unittest" + delete "#{install_dir}/embedded/lib/python*/lib-dynload/_bsddb*" + delete "#{install_dir}/embedded/lib/python*/lib-dynload/readline*" + delete "#{install_dir}/embedded/man" + delete "#{install_dir}/embedded/share" +end diff --git a/config/software/asdf_ruby.rb b/config/software/asdf_ruby.rb new file mode 100644 index 0000000..13b98c5 --- /dev/null +++ b/config/software/asdf_ruby.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +name "asdf_ruby" +default_version "2.7.1" +license "BSD-2-Clause" +license_file "BSDL" +license_file "COPYING" +license_file "LEGAL" + +dependency "libffi" +dependency "libyaml" +dependency "openssl" +dependency "zlib" + +source url: "https://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz" +relative_path "ruby-#{version}" + +version("2.7.1") { source sha256: "d418483bdd0000576c1370571121a6eb24582116db0b7bb2005e90e250eae418" } +version("2.7.0") { source sha256: "8c99aa93b5e2f1bc8437d1bbbefd27b13e7694025331f77245d0c068ef1f8cbe" } + +version("2.6.6") { source sha256: "364b143def360bac1b74eb56ed60b1a0dca6439b00157ae11ff77d5cd2e92291" } +version("2.6.5") { source sha256: "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d" } +version("2.6.4") { source sha256: "4fc1d8ba75505b3797020a6ffc85a8bcff6adc4dabae343b6572bf281ee17937" } +version("2.6.3") { source sha256: "577fd3795f22b8d91c1d4e6733637b0394d4082db659fccf224c774a2b1c82fb" } +version("2.6.2") { source sha256: "a0405d2bf2c2d2f332033b70dff354d224a864ab0edd462b7a413420453b49ab" } +version("2.6.1") { source sha256: "17024fb7bb203d9cf7a5a42c78ff6ce77140f9d083676044a7db67f1e5191cb8" } +version("2.6.0") { source sha256: "f3c35b924a11c88ff111f0956ded3cdc12c90c04b72b266ac61076d3697fc072" } + +version("2.5.8") { source sha256: "6c0bdf07876c69811a9e7dc237c43d40b1cb6369f68e0e17953d7279b524ad9a" } + +version("2.4.10") { source sha256: "93d06711795bfb76dbe7e765e82cdff3ddf9d82eff2a1f24dead9bb506eaf2d0" } +version("2.4.9") { source sha256: "f99b6b5e3aa53d579a49eb719dd0d3834d59124159a6d4351d1e039156b1c6ae" } +version("2.4.5") { source sha256: "6737741ae6ffa61174c8a3dcdd8ba92bc38827827ab1d7ea1ec78bc3cefc5198" } + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--disable-debug-env", + "--disable-dtrace", + "--disable-install-capi", + "--disable-install-doc", + "--disable-install-rdoc", + "--disable-jit-support", + "--enable-shared", + "--prefix=#{install_dir}", + "--with-out-ext=coverage,dbm,readline,rdoc,win32,win32ole,sdbm", + "--without-gdbm", + "--without-gmp", + "--without-jemalloc", + "--without-tk", + "--without-valgrind" + ] + configure(*configure_command, env: env) + make "-j #{workers}", env: env + make "-j #{workers} install", env: env +end + +build do + delete "#{install_dir}/share" + delete "#{install_dir}/bin/*racc*" + delete "#{install_dir}/bin/erb" + delete "#{install_dir}/bin/irb" + delete "#{install_dir}/bin/rake" + delete "#{install_dir}/bin/rdoc" + delete "#{install_dir}/bin/ri" + delete "#{install_dir}/embedded/share" + delete "#{install_dir}/lib/ruby/gems/**/cache" + delete "#{install_dir}/lib/ruby/gems/**/doc" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/.github" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/.gitignore" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/.travis.yml" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/bundler/man" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/man" + delete "#{install_dir}/lib/ruby/gems/**/gems/**/test" +end diff --git a/config/software/asdf_rust.rb b/config/software/asdf_rust.rb new file mode 100644 index 0000000..fa1016d --- /dev/null +++ b/config/software/asdf_rust.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +name "asdf_rust" +default_version "1.45.0" +whitelist_file "lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld" + +source url: "https://static.rust-lang.org/dist/rust-#{version}-x86_64-unknown-linux-gnu.tar.gz" +relative_path "rust-#{version}-x86_64-unknown-linux-gnu" + +version "1.45.0" do + source sha256: "c34ed8722759fd60c94dbc9069833da5b3b873dcd19afaa9b34c1ce2c2cfa229" +end + +build do + env = with_standard_compiler_flags(with_embedded_path) + command "sh install.sh" \ + " --prefix=#{install_dir}" \ + " --components=rustc,cargo" \ + " --verbose", env: env +end + +build do + delete "#{install_dir}/share" + delete "#{install_dir}/etc" + delete "#{install_dir}/bin/rustdoc" + delete "#{install_dir}/bin/rust-gdb" + delete "#{install_dir}/bin/rust-gdbgui" +end diff --git a/config/software/libsqlite3.rb b/config/software/libsqlite3.rb new file mode 100644 index 0000000..ff9cc27 --- /dev/null +++ b/config/software/libsqlite3.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +name "libsqlite3" +default_version "3.32.3" + +dependency "config_guess" + +source url: "https://www.sqlite.org/2020/sqlite-autoconf-3320300.tar.gz", + sha1: "ea14ef2dc4cc7fcbc5ebbb018d3a03faa3a41cb4" + +relative_path "sqlite-autoconf-3320300" + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--prefix=#{install_dir}/embedded", + "--disable-nls" + ] + configure(*configure_command, env: env) + make("-j #{workers}", env: env) + make("-j #{workers} install", env: env) +end diff --git a/config/software/license_management.rb b/config/software/license_management.rb index be19ddb..de8a854 100644 --- a/config/software/license_management.rb +++ b/config/software/license_management.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative '../../lib/license/management/version.rb' name "license_management" @@ -18,17 +20,34 @@ build do gem "build #{project_dir}/license-management.gemspec -o #{project_dir}/release.gem" gem "install -f #{project_dir}/release.gem --no-document" delete "#{project_dir}/release.gem" - command "cp #{install_dir}/embedded/bin/license_management #{install_dir}/bin/license_management" - + copy "#{install_dir}/embedded/bin/license_management", "#{install_dir}/bin/license_management" command "cp -r #{project_dir}/config/files/. #{install_dir}/" +end + +build do command "mvn license:license-list" - command "mvn dependency:get -Dartifact=gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0 -DremoteRepositories=https://plugins.gradle.org/m2" + command [ + :mvn, + "dependency:get", + "-Dartifact=gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0", + "-DremoteRepositories=https://plugins.gradle.org/m2" + ].map(&:to_s).join(' ') command "mvn dependency:get -Dartifact=org.codehaus.plexus:plexus-utils:2.0.6" copy "#{Dir.home}/.m2/repository/", "#{install_dir}/.m2/repository/" end build do + touch "#{install_dir}/.config/virtualenv/app-data/.keep" + command "pip2 download -d #{install_dir}/.config/virtualenv/app-data pip-licenses pip setuptools wheel" + command "pip3 download -d #{install_dir}/.config/virtualenv/app-data pip-licenses pip setuptools wheel" +end + +build do delete "#{install_dir}/embedded/lib/ruby/gems/**/cache" delete "#{install_dir}/embedded/lib/ruby/gems/**/doc" delete "#{install_dir}/embedded/lib/ruby/gems/**/build_info" + command "find #{install_dir} -type f -name '*.png' -exec rm {} +" + command "find #{install_dir} -type f -name '*.ttf' -exec rm {} +" + command "find #{install_dir} -type f -name '*.rhtml' -exec rm {} +" + command "find #{install_dir} -type f -name '*.js' -exec rm {} +" end diff --git a/config/software/ruby.rb b/config/software/ruby.rb index 56a04fc..316a342 100644 --- a/config/software/ruby.rb +++ b/config/software/ruby.rb @@ -1,4 +1,4 @@ -require 'fileutils' +# frozen_string_literal: true name "ruby" @@ -6,7 +6,6 @@ license "BSD-2-Clause" license_file "BSDL" license_file "COPYING" license_file "LEGAL" -skip_transitive_dependency_licensing true default_version "2.7.1" @@ -44,8 +43,8 @@ build do end build do - command "#{embedded_dir}/bin/gem install bundler -v'~> 2.0' --no-document" - command "#{embedded_dir}/bin/gem install bundler -v'~> 1.0' --no-document" + command "#{embedded_dir}/bin/gem install bundler -v '~> 1.0' --no-document" + command "#{embedded_dir}/bin/gem install bundler -v '~> 2.0' --no-document" end build do |
