scala template
Getty Ritter
9 years ago
1 | # Template file for 'scala' | |
2 | pkgname=scala | |
3 | version=2.11.7 | |
4 | revision=1 | |
5 | hostmakedepends="apache-ant curl" | |
6 | makedepends="openjdk git" | |
7 | depends="virtual?java-runtime" | |
8 | short_desc="Hybrid object-oriented and functional language for the JVM" | |
9 | maintainer="Getty Ritter <gdritter@galois.com>" | |
10 | license="GPL-3" | |
11 | homepage="http://www.scala-lang.org/" | |
12 | distfiles="https://github.com/scala/scala/archive/v2.11.7.tar.gz>${pkgname}-${version}.tar.gz" | |
13 | checksum="1679ee604bc4e881b0d325e164c39c02dcfa711d53cd3115f5a6c9676c5915ef" | |
14 | ||
15 | do_build() { | |
16 | . /etc/profile.d/apache-ant.sh | |
17 | . /etc/profile.d/10_openjdk.sh | |
18 | ||
19 | ls ${pwd} | |
20 | ||
21 | export ANT_OPTS="-Xms2500M -Xmx2500M -Xss8M -XX:MaxPermSize=1024M -XX:+UseParallelGC" | |
22 | export M2_OPTS="-Dmaven.repo.local=/tmp" | |
23 | ||
24 | ant build-opt pack.doc osgi.done -Dbuild.release=true -Duser.home=/tmp | |
25 | } | |
26 | ||
27 | do_install() { | |
28 | install -d ${DESTDIR}/usr/{bin,share} | |
29 | install -d ${DESTDIR}/usr/share/man/man1 | |
30 | install -d ${DESTDIR}/usr/share/scala/{bin,lib} | |
31 | cp -r ${wrksrc}/build/pack/lib ${DESTDIR}/usr/share/scala/ | |
32 | cp -r ${wrksrc}/build/pack/man ${DESTDIR}/usr/share/ | |
33 | install -m 755 ${wrksrc}/build/pack/bin/{fsc,scala,scalac,scalap,scaladoc} ${DESTDIR}/usr/share/scala/bin | |
34 | ||
35 | for tgt in fsc scala scalac scalap scaladoc | |
36 | do | |
37 | ln -s ../share/scala/bin/${tgt} ${DESTDIR}/usr/bin/${tgt} | |
38 | done | |
39 | } |