Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add coursier 2.0.16 #13411

Closed
wants to merge 13 commits into from
28 changes: 28 additions & 0 deletions recipes/coursier/build_coursier.bat
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions recipes/coursier/build_coursier.sh
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions recipes/coursier/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{% set name = "coursier" %}
{% set version = "2.0.7" %}

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: d3ba37e53d9cfa778af481c7099cd1dc485242283e9d2c5c2753f3859908cbd4

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
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