void-packages/srcpkgs/choosenim/template
SolitudeSF 752fef20ff New package: choosenim-0.3.0
Closes: #11082 [via git-merge-pr]
2018-01-31 07:13:06 +01:00

35 lines
798 B
Bash

# Template file for 'choosenim'
pkgname=choosenim
version=0.3.0
revision=1
hostmakedepends="git nim"
makedepends="libressl-devel zlib-devel"
depends="gcc"
short_desc="The Nim toolchain installer"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="MIT"
homepage="https://github.com/dom96/choosenim"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=12b7c705bd62a31b3cb24ad520123916f9c0ce7da72cd8d50609de8309616c54
do_build() {
local arch args
case "$XBPS_TARGET_MACHINE" in
aarch64*) arch=arm64;;
arm*) arch=arm;;
mips*) arch=mips;;
esac
if [ -n "$arch" ]; then
cat > nim.cfg <<EOF
${arch}.linux.gcc.exe = "$CC"
${arch}.linux.gcc.linkerexe = "$CC"
EOF
args="--cpu:${arch}"
fi
nimble -y build ${args}
}
do_install() {
vbin bin/choosenim
vlicense LICENSE
}