summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorQuentin Bouvet2021-11-14 19:20:22 +0100
committerQuentin Bouvet2021-11-14 19:20:22 +0100
commitd5fe94f3c2e3fe5ad7a5bd68b8f73b54d9db1d77 (patch)
treee1ca8326497eee858a52f2c13a90ac3a8abd7279 /PKGBUILD
parent6d838c3c9b86f22afecc79fd729fa54cc8b99c22 (diff)
downloadaur-d5fe94f3c2e3fe5ad7a5bd68b8f73b54d9db1d77.tar.gz
Update to lastest almond version (0.11.2) and scala version (2.13.1)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD70
1 files changed, 52 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bae3ed3f3af4..2456b1927048 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,63 @@
-# Maintainer: Kilian Guillaume "cafehaine" <kilian dot guillaume at gmail dot com>
+# Maintainer: Quentin Bouvet < qbouvet at outlook >
pkgname=almond
+pkgver=0.11.2
pkgrel=1
-pkgver=0.9.1
_scalaver=2.13.1
pkgdesc="A scala kernel for Jupyter"
-arch=('x86_64')
+arch=('any')
url="https://almond.sh/"
license=('BSD')
-depends=('jupyter' 'scala')
-makedepends=()
-source=("https://git.io/coursier-cli" "kernel.json")
-md5sums=('SKIP' 'SKIP')
+makedepends=('coursier')
+depends=('scala' 'jupyter')
+
+# Regarding versions:
+# - https://almond.sh/docs/install-versions
+# - https://repo1.maven.org/maven2/sh/almond/
+
+source=("${pkgname}-${pkgver}::https://github.com/almond-sh/almond/archive/refs/tags/v${pkgver}.tar.gz"
+ "kernel.json.template")
+#install=${pkgname}.install
+md5sums=('1d70b12fc9420252736340080c916ac3'
+ 'c8015b7cd10ab14c914eb688c3886703')
package() {
- cd "$srcdir"
- export SCALA_VERSION=$_scalaver
- export ALMOND_VERSION=$pkgver
- export COURSIER_CACHE=$(pwd)/.coursier-cache
- chmod +x coursier-cli
- ./coursier-cli bootstrap \
- -r jitpack \
- -i user -I user:sh.almond:scala-kernel-api_$SCALA_VERSION:$ALMOND_VERSION \
- sh.almond:scala-kernel_$SCALA_VERSION:$ALMOND_VERSION \
- -o almond
+
+ cd "${srcdir}"
+
+ export SCALA_VERSION=${_scalaver}
+ export ALMOND_VERSION=${pkgver}
+
+ export COURSIER_CACHE="$pkgdir/usr/share/almond/coursier/cache"
+ mkdir -p $COURSIER_CACHE
+
+ export COURSIER_JVM_CACHE="$pkgdir/usr/share/almond/coursier/jvm_cache"
+ mkdir -p $COURSIER_JVM_CACHE
+
+ # Alternative way for reference:
+ #
+ #coursier launch almond:${pkgver} -M almond.ScalaKernel \
+ # --scala ${_scalaver} --fork \
+ # -- \
+ # --install --jupyter-path $pkgdir/usr/share/jupyter/kernels
+ #
+ #install -Dm644 kernel.json -t "$pkgdir/usr/share/jupyter/kernels/scala/"
+
+ # (!) -M option is needed for new versions but not for old versions of almond
+ coursier bootstrap almond:$ALMOND_VERSION \
+ --scala $SCALA_VERSION \
+ --sources --default=true \
+ --embed-files=false \
+ -M almond.ScalaKernel \
+ -o almond -f
+
./almond --install --jupyter-path "$pkgdir/usr/share/jupyter/kernels/"
- install -Dm644 kernel.json -t "$pkgdir/usr/share/jupyter/kernels/scala/"
+
+ envsubst < "$srcdir"/kernel.json.template > "$pkgdir/usr/share/jupyter/kernels/scala/kernel.json"
+ chmod 644 "$pkgdir/usr/share/jupyter/kernels/scala/kernel.json"
+
}
+#
+# makepkg --printsrcinfo > .SRCINFO
+#
+