[arch-commits] Commit in scala/repos (2 files)
Evgeniy Alekseev
arcanis at archlinux.org
Wed May 16 16:21:16 UTC 2018
Date: Wednesday, May 16, 2018 @ 16:21:16
Author: arcanis
Revision: 322923
archrelease: copy trunk to community-testing-any
Added:
scala/repos/community-testing-any/
scala/repos/community-testing-any/PKGBUILD
(from rev 322922, scala/trunk/PKGBUILD)
----------+
PKGBUILD | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
Copied: scala/repos/community-testing-any/PKGBUILD (from rev 322922, scala/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-05-16 16:21:16 UTC (rev 322923)
@@ -0,0 +1,78 @@
+# $Id$
+# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail dot com>
+# Contributor: Marcin Karpezo <sirmacik at gmail dot com>
+
+pkgbase=scala
+pkgname=(scala scala-docs scala-sources)
+pkgver=2.12.6
+pkgrel=1
+_watch="https://github.com/scala/scala/releases"
+_distdate=20180423-115500
+_distsha=d7ae7a8b96
+pkgdesc="A Java-interoperable language with object-oriented and functional features"
+arch=('any')
+url="http://www.scala-lang.org"
+license=('BSD')
+depends=('java-environment=8' 'java-runtime=8')
+makedepends=('git' 'sbt')
+source=("scala-${pkgver}.tar.gz::https://github.com/scala/scala/archive/v${pkgver}.tar.gz"
+ "scala-docs-${pkgver}.tar.xz::http://www.scala-lang.org/files/archive/scala-docs-${pkgver}.txz")
+sha512sums=('471bb3f5a8d458941c078df84101d01facc2aa11af7c8c4796dd7bb7ba5d11a7939b41fee2ed7e09be8bc57a578357668b0ad8e34dea5b55c42b41196915dee4'
+ '41189557a18bce49c3a7e711c4c8aad62ba1e58bda0e7f86b208ddad6d553e75b08f59ad23c9c701bbf4a75566584f466ebc18c6fc1acd07c403c870c5663d78')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ chmod 0755 tools/*
+ echo -e "#!/bin/bash\necho ${_distdate}" > "tools/get-scala-commit-date"
+ echo -e "#!/bin/bash\necho ${_distsha}" > "tools/get-scala-commit-sha"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sbt dist/mkPack packageSrc packageDoc
+}
+
+package_scala() {
+ depends=('java-runtime')
+ optdepends=('scala-docs'
+ 'scala-sources'
+ 'graphviz: generate diagrams')
+
+ cd "${srcdir}/${pkgname}-${pkgver}/build/pack"
+
+ install -d "${pkgdir}/usr/"{bin,share} "${pkgdir}/usr/share/man/man1" "${pkgdir}/usr/share/scala/"{bin,lib}
+ cp -r lib "${pkgdir}/usr/share/scala/"
+ install -m755 bin/{fsc,scala,scalac,scalap,scaladoc} "${pkgdir}/usr/share/scala/bin"
+ install -Dm0644 "${srcdir}/scala-${pkgver}/doc/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+
+ ln -s "../share/scala/bin/fsc" "${pkgdir}/usr/bin/fsc"
+ ln -s "../share/scala/bin/scala" "${pkgdir}/usr/bin/scala"
+ ln -s "../share/scala/bin/scalac" "${pkgdir}/usr/bin/scalac"
+ ln -s "../share/scala/bin/scalap" "${pkgdir}/usr/bin/scalap"
+ ln -s "../share/scala/bin/scaladoc" "${pkgdir}/usr/bin/scaladoc"
+}
+
+package_scala-docs() {
+ replaces=('scala-doc' 'scala-devel-docs')
+ pkgdesc="Scala documentation"
+ depends=()
+
+ cd "${srcdir}/scala-${pkgver}"
+ mkdir -p "${pkgdir}/usr/share/doc/"
+ cp -r api "${pkgdir}/usr/share/doc/scala"
+ install -Dm0644 "${srcdir}/scala-${pkgver}/doc/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+}
+
+package_scala-sources() {
+ replaces=('scala-src')
+ pkgdesc="Scala sources"
+ depends=()
+
+ cd "${srcdir}/scala-${pkgver}"
+ mkdir -p "${pkgdir}/usr/share/scala/"
+ find . -type f -name '*-sources.jar' | while read f; do
+ install -Dm0644 "${f}" "${pkgdir}/usr/share/scala/src/$(basename -- ${f})"
+ done
+ install -Dm0644 "${srcdir}/scala-${pkgver}/doc/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+}
More information about the arch-commits
mailing list