sbt-bin-0.12.4.ebuild 849 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit java-pkg-2
  5. DESCRIPTION="sbt, a build tool for Scala."
  6. HOMEPAGE="http://scala-sbt.org"
  7. SRC_URI="https://dl.bintray.com/sbt/native-packages/sbt/${PV}/${PN/-bin}-${PV}.tgz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE=""
  12. DEPEND=""
  13. RDEPEND="
  14. >=virtual/jre-1.7
  15. !dev-java/sbt"
  16. src_unpack() {
  17. default
  18. mv "${WORKDIR}/sbt" "${S}" || die
  19. }
  20. java_prepare() {
  21. java-pkg_init_paths_
  22. }
  23. src_install() {
  24. local dest="${JAVA_PKG_SHAREPATH}"
  25. rm -f bin/sbt.bat || die
  26. sed -i -e 's#bin/sbt-launch.jar#lib/sbt-launch.jar#g;' \
  27. bin/sbt-launch-lib.bash || die
  28. insinto "${dest}/lib"
  29. doins bin/* || die
  30. insinto "${dest}"
  31. doins -r conf || die
  32. fperms 0755 "${dest}/lib/sbt" || die
  33. dosym "${dest}/lib/sbt" /usr/bin/sbt || die
  34. }