updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / sbt / PKGBUILD
blob58a6c4fed8b1efa6be7127fb2dbe1e6bd79dd373
1 # Maintainer: jpate <j.k.pate@sms.ed.ac.uk>
2 pkgname=sbt
3 pkgver=0.11.2
4 maintainer="jpate"
5 pkgrel=1
6 pkgdesc="Simple-build-tool: A build tool for Scala"
7 arch=('any')
8 url="https://github.com/harrah/xsbt/"
9 license=('New BSD License')
10 depends=( 'java-runtime' )
11 source=( "http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/${pkgver}/sbt-launch.jar" )
12 noextract=('sbt-launch.jar')
13 md5sums=('2886cc391e38fa233b3e6c0ec9adfa1e')
15 build() {
16   cd $startdir/
18   mkdir -p $pkgdir/usr/bin/
19   mkdir -p $pkgdir/usr/share/sbt/
20   cp $srcdir/sbt-launch.jar $pkgdir/usr/share/sbt/
22   cat > $pkgdir/usr/bin/sbt <<EOF
23 #!/bin/sh
24 if [[ -n "\$JAVA_HOME" ]]; then
25   JAVA_CMD=\$JAVA_HOME/bin/java
26 else
27   JAVA_CMD=\$(which java)
29 if [[ -z "\$JAVA_ARGS" ]]; then
30   JAVA_ARGS=""
32 EOF
33   echo "\$JAVA_CMD \$JAVA_ARGS \${SBT_OPTS} -jar /usr/share/sbt/sbt-launch.jar  \"\$@\"" >> $pkgdir/usr/bin/sbt
35   chmod a+x $pkgdir/usr/bin/sbt