void-packages/srcpkgs/sbt/template

30 lines
893 B
Bash

# Template file for 'sbt'
pkgname=sbt
version=1.6.1
revision=1
wrksrc="$pkgname"
depends="virtual?java-environment"
short_desc="Interactive build tool for Scala and Java"
maintainer="Damian Czaja <trojan295@gmail.com>"
license="Apache-2.0"
homepage="https://www.scala-sbt.org"
distfiles="https://github.com/sbt/sbt/releases/download/v${version}/${pkgname}-${version}.tgz"
checksum=60286bf1b875b31e2955f8a699888cd2612e9afd94d03cde0a2e71efd7492ffc
do_install() {
vmkdir usr/lib/sbt
vmkdir usr/bin
vcopy "*" usr/lib/sbt
ln -rs ${DESTDIR}/usr/lib/sbt/bin/sbt ${DESTDIR}/usr/bin/sbt
rm ${DESTDIR}/usr/lib/${pkgname}/bin/*.bat
rm ${DESTDIR}/usr/lib/${pkgname}/bin/*.exe
rm ${DESTDIR}/usr/lib/${pkgname}/bin/*apple-darwin
# Remove x86_64 binaries when it doesn't match the machine.
case "$XBPS_TARGET_MACHINE" in
x86_64) ;;
*) rm ${DESTDIR}/usr/lib/${pkgname}/bin/*x86_64* ;;
esac
}