1 # Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Leif Warner <abimelech@gmail.com>
9 pkgdesc='The interactive build tool'
11 url='https://www.scala-sbt.org/'
13 depends=('java-runtime-headless' 'sh')
14 IFS='.' read -a _pkgver <<< "${pkgver}"
15 _majorver=${_pkgver[0]}.x
17 source=(https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tgz{,.asc}
19 validpgpkeys=('2EE0EA64E40A89B84B2DF73499E82A75642AC823') # sbt build tool
20 sha512sums=('7673f0670f00f24f41ee36481f54827c5ae771866ebf3a6f7a9efa6891bff8c6d315368f760ac574ceb2ef7b2484464ead21030f57047b1bc7859ab79b4254da'
22 '49fefd36f8e3e796efd2b95aec76781832f64163445b6ebba624e385446bcbd308e27a82770b5e7b1ce7d4cd406d771549f0a121f1310611c92b3e15bff209d0')
23 backup=(etc/${pkgname}/sbtopts)
28 mkdir -p "${pkgdir}"/usr/share/${pkgname}
29 cp -r bin "${pkgdir}"/usr/share/${pkgname}
30 rm "${pkgdir}"/usr/share/${pkgname}/bin/*{.bat,.exe,-darwin}
31 chmod -x "${pkgdir}"/usr/share/${pkgname}/bin/*
32 chmod +x "${pkgdir}"/usr/share/${pkgname}/bin/{sbt,sbtn-x86_64-pc-linux}
33 mkdir -p "${pkgdir}"/usr/bin
34 ln -s /usr/share/${pkgname}/bin/sbt "${pkgdir}"/usr/bin/sbt
36 mkdir -p "${pkgdir}/etc"
37 cp -r conf "${pkgdir}"/etc/${pkgname}
38 rm "${pkgdir}"/etc/${pkgname}/sbtconfig.txt
39 ln -s /etc/${pkgname} "${pkgdir}"/usr/share/${pkgname}/conf
41 install -D "${srcdir}"/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}