void-packages/srcpkgs/babashka/template

88 lines
3.6 KiB
Bash

# Template file for 'babashka'
pkgname=babashka
version=0.7.8
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/"
changelog="https://github.com/babashka/babashka/blob/master/CHANGELOG.md"
_sci_commit=4eb8e99e18942ba9c3b7ec3c4707d8237f970035
_babashka_curl_commit=3d3d117ea0f8a143a06e3cace92e4e8b6a5782df
_babashka_nrepl_commit=d3fce67198b042707f01d841c032f841cc57ab7f
_depstar_commit=c419b8c82041855d55593c5b561fc7cea8234712
_process_commit=5db9560eab698f9773537acb0167f38d6fd0d322
_pods_commit=538fc6f4147badf3a457b3eb8f9f95dd3bc947b1
_deps_clj_commit=6636890388cdf779708806a93110b165577cd226
_fs_commit=2bf527f797d69b3f14247940958e0d7b509f3ce2
_babashka_core_commit=52a6037bd4b632bffffb04394fb4efd0cdab6b1e
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
https://github.com/babashka/babashka.core/archive/${_babashka_core_commit}.tar.gz"
checksum="23a08adcc9237be9f24c1781cb646514434dbcb651aac00c3eedca763ca25086
0766f0a8be23e94efefbfc16c5987f1dab4520da3294f1bccef402f97898c490
45abdaa5e4effd3bcfea777d02844d4634f1f80a592843eca9ec7d3544b7e16d
b56a06bf113bcd85084d48f595541447014308860d9c45efcde5b02e859c934c
9d214a10a4f5e4f15b9c80354dae85689a40e941ec3417203354c0dc3ce9457b
b6671246a1f0742bd4ae4d1f7b0afe4101d6c8907060455e0473c2ef966e370c
7fea6762ecbb31d454e0b5c194d12e1e6d4ec301972aa33daf617b571e097678
fee3f84f935d141cf7343d7bab19c3eef56fdb2f3dac4a950db71c9b083e0d17
e5b92a25221b735941861968a5570a4169da1aee7f2a7545975afe930cb8574f
bad285812bcc7de7e0dd905c5df99045d7f92d6e2e191fc2768c06adbaaeb709"
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.core
mv ${wrksrc}/../babashka.core-${_babashka_core_commit} ${wrksrc}/babashka.core
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_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
}