void-packages/srcpkgs/babashka/template
2021-11-26 15:39:42 +01:00

85 lines
3.3 KiB
Bash

# Template file for 'babashka'
pkgname=babashka
version=0.6.5
revision=1
hostmakedepends="mandrel leiningen git"
makedepends="zlib-devel"
checkdepends="clojure curl"
short_desc="Native, fast starting Clojure interpreter for scripting"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="EPL-1.0"
homepage="https://babashka.org/"
_sci_commit=7896fe1bab824e8e07b198c6eaed1ec465ae3baa
_babashka_curl_commit=2187f908c033da45978512979c53bb53321120ce
_babashka_nrepl_commit=eadb3330f0a65e781755d8b328727698f1d41fb0
_depstar_commit=c419b8c82041855d55593c5b561fc7cea8234712
_process_commit=4fdf33c0243ff646dfa91c4454844a33e0f025b0
_pods_commit=f360afa6135b8bd2d384d9ba4582c0de6fdac804
_deps_clj_commit=422b080c64dedad37979a748377394b2d4de7e7c
_fs_commit=21eb0654efad0ffbeedfe8319dd1194319b30d29
distfiles="https://github.com/babashka/babashka/archive/refs/tags/v${version}.tar.gz
https://github.com/borkdude/sci/archive/${_sci_commit}.tar.gz
https://github.com/babashka/babashka.curl/archive/${_babashka_curl_commit}.tar.gz
https://github.com/babashka/babashka.nrepl/archive/${_babashka_nrepl_commit}.tar.gz
https://github.com/babashka/depstar/archive/${_depstar_commit}.tar.gz
https://github.com/babashka/process/archive/${_process_commit}.tar.gz
https://github.com/babashka/pods/archive/${_pods_commit}.tar.gz
https://github.com/borkdude/deps.clj/archive/${_deps_clj_commit}.tar.gz
https://github.com/babashka/fs/archive/${_fs_commit}.tar.gz"
checksum="9053ba3582dbc94e4221eefe4e7f507d0c9e4d90aa5f941fb504f658ed3ceea2
9ec8e74253e1a3a5ac1fbb1b1ed2c549a4bb194ffde55829683c11d6a1c67904
d4efe2c84512c3914d80087a43f9dc8377b4318ab63579959c4488038d6b766b
916d9cc8c0a3b895a72068b95c6ac985a65d30465a9d556af8acea20aaaacc42
9d214a10a4f5e4f15b9c80354dae85689a40e941ec3417203354c0dc3ce9457b
dcb999043dfc807a1ebfae99027b4434e726f647aa52fbd70ed58202d907d39a
4070395956fc3cb0c22bac6fb4de1ad27130d24916e1915d8a3fe9eb591f6143
dba354c4637595ed6a24e76914497dcb6f0059b531d8cd3c8c8c23385fff605a
2ebe97b7fe0ad349a6a1ff567df2c372571b9a672d81f5f5f83bbf45af708d71"
nocross="https://build.voidlinux.org/builders/aarch64_builder/builds/33769/steps/shell_3/logs/stdio"
post_extract() {
rmdir -v ${wrksrc}/sci
mv ${wrksrc}/../sci-${_sci_commit} ${wrksrc}/sci
rmdir -v ${wrksrc}/babashka.curl
mv ${wrksrc}/../babashka.curl-${_babashka_curl_commit} ${wrksrc}/babashka.curl
rmdir -v ${wrksrc}/babashka.nrepl
mv ${wrksrc}/../babashka.nrepl-${_babashka_nrepl_commit} ${wrksrc}/babashka.nrepl
rmdir -v ${wrksrc}/depstar
mv ${wrksrc}/../depstar-${_depstar_commit} ${wrksrc}/depstar
rmdir -v ${wrksrc}/process
mv ${wrksrc}/../process-${_process_commit} ${wrksrc}/process
rmdir -v ${wrksrc}/pods
mv ${wrksrc}/../pods-${_pods_commit} ${wrksrc}/pods
rmdir -v ${wrksrc}/deps.clj
mv ${wrksrc}/../deps.clj-${_deps_clj_commit} ${wrksrc}/deps.clj
rmdir -v ${wrksrc}/fs
mv ${wrksrc}/../fs-${_fs_commit} ${wrksrc}/fs
}
do_patch() {
vsed -i -e '/install native-image/d' script/compile
}
do_build() {
export GRAALVM_HOME=/usr/lib/jvm/mandrel11
if [ "$XBPS_TARGET_LIBC" = musl ]; then
export BABASHKA_MUSL=true
export BABASHKA_STATIC=true # mandrel workaround
fi
lein deps
script/uberjar
script/compile
}
do_check() {
export BABASHKA_TEST_ENV=native
script/test
script/run_lib_tests
}
do_install() {
vbin bb
vlicense LICENSE
}