void-packages/srcpkgs/babashka/template
2021-09-18 23:26:36 +02:00

85 lines
3.3 KiB
Bash

# Template file for 'babashka'
pkgname=babashka
version=0.6.1
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=422bce7925b77cb4175e940d0d1d0f9439b46ad6
_babashka_curl_commit=cf71c8ae24a4f8ec85663970f4b8a3f63a0c1a6b
_babashka_nrepl_commit=47c64227afe869ed9dfba739077c50b06650c0aa
_depstar_commit=c419b8c82041855d55593c5b561fc7cea8234712
_process_commit=4fdf33c0243ff646dfa91c4454844a33e0f025b0
_pods_commit=de4c3610c9ef3879370d01b7202a9f3a9d056f6e
_deps_clj_commit=c86fa1bff9564f48b3513e4e4820840bc65c4188
_fs_commit=5339280ee1006de65b6461ed08cfdf2a7b7a4b10
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="396bb8a0165f78997f0147273883c3a3d163d55ff6f8b07239aa4afbaa918920
8dd8b42e64a6b6511c924696c4792c2e7a597b52c5107758fee83a5ccd42f142
e318e4563a278488a0a2d91b2d7c56bd8a0e2be8b895d91435822a047e85c0c3
470866fb6c72aa03ead79179ab6113aa2d41b0950dd127b82c95d9a599dd0126
9d214a10a4f5e4f15b9c80354dae85689a40e941ec3417203354c0dc3ce9457b
dcb999043dfc807a1ebfae99027b4434e726f647aa52fbd70ed58202d907d39a
9fdd931dc27ff8831dcd456ee5382eda5698cb4d34bf4a72ded0c8c7ac6f74bc
437a7d55dafe5df0bcb0ee0b15d4ef90ab9c5d30cbb43ccdb4de88c0ea55257b
a9b4463e39c196dc2bb74a383639eeacdfe5634e445ba051bae458346965dee9"
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
}