diff --git a/recipes/coursier/build_coursier.bat b/recipes/coursier/build_coursier.bat new file mode 100644 index 0000000000000..8aeada6f0b2ec --- /dev/null +++ b/recipes/coursier/build_coursier.bat @@ -0,0 +1,28 @@ +@echo on +:: derived from https://github.com/2m/coursier-pkgbuild/blob/master/PKGBUILD +set "COURSIER_CACHE=%SRC_DIR%\cache" + +md "%COURSIER_CACHE%" || goto :ERROR +md "%PREFIX%\Scripts" || goto :ERROR + +:: TODO: remove debugging +dir + +java ^ + -noverify ^ + -jar coursier ^ + bootstrap ^ + "io.get-coursier::coursier-cli:%PKG_VERSION%" ^ + --java-opt "-noverify" ^ + --no-default ^ + -r central ^ + -r typesafe:ivy-releases ^ + -f -o "%PREFIX%\Scripts\coursier" ^ + --standalone ^ + || goto :ERROR + +goto :EOF + +:ERROR +echo FAIL Building %PKG_NAME% %PKG_VERSION% with error #%errorlevel%. +exit /b 1 diff --git a/recipes/coursier/build_coursier.sh b/recipes/coursier/build_coursier.sh new file mode 100644 index 0000000000000..6e9b2cb772931 --- /dev/null +++ b/recipes/coursier/build_coursier.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# derived from https://github.com/2m/coursier-pkgbuild/blob/master/PKGBUILD +set -eux + +export COURSIER_CACHE="$SRC_DIR/cache" + +mkdir -p $COURSIER_CACHE + +bash ./coursier \ + bootstrap \ + "io.get-coursier::coursier-cli:${PKG_VERSION}" \ + --java-opt "-noverify" \ + --no-default \ + -r central \ + -r typesafe:ivy-releases \ + -f -o "$PREFIX/bin/coursier" \ + --standalone diff --git a/recipes/coursier/meta.yaml b/recipes/coursier/meta.yaml new file mode 100644 index 0000000000000..dcdde216ff3e1 --- /dev/null +++ b/recipes/coursier/meta.yaml @@ -0,0 +1,71 @@ +{% set name = "coursier" %} +{% set version = "2.0.16" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + - fn: {{ name }}-{{ version }}-LICENSE-APACHE + url: https://raw.githubusercontent.com/{{ name }}/{{ name }}/v{{ version }}/LICENSE + sha256: cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 + - url: https://github.com/{{ name }}/{{ name }}/releases/download/v{{ version }}/{{ name }} + sha256: 631e8fbc1a3beb71a7130539b3b01852cfbe02edb94c5e9c6785981a0aee1e9c + +build: + number: 0 + +requirements: + build: + - openjdk + host: + - openjdk + +test: + commands: + - echo "TBD" + +outputs: + - name: {{ name }}-base + requirements: + build: + - openjdk + build: + script: call "%RECIPE_DIR%\build_{{ name }}.bat" # [win] + script: bash "${RECIPE_DIR}/build_{{ name }}.sh" # [unix] + test: + commands: + - dir "%SCRIPTS%\{{ name }}.bat" # [win] + - ls "${PREFIX}/bin/{{ name }}" # [unix] + + - name: {{ name }} + requirements: + run: + - openjdk + - {{ name }}-base ={{ version }} + test: + requirements: + - openjdk + commands: + - java -version + - {{ name }} --version + - {{ name }} --help + about: + summary: Pure Scala Artifact Fetching (with conda JDK) + +about: + home: https://get-coursier.io + license: Apache-2.0 + license_family: APACHE + license_file: + - {{ name }}-{{ version }}-LICENSE-APACHE + # TODO: get licenses + # - library_licenses/ + summary: Pure Scala Artifact Fetching + doc_url: https://get-coursier.io/docs/overview + dev_url: https://github.com/coursier/coursier + +extra: + recipe-maintainers: + - bollwyvl + - dbast