1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: Romain Gautier <romain.gautier@nimamoh.com>
7 pkgdesc='Statically typed programming language that can interoperate with Java'
9 url='https://kotlinlang.org/'
10 license=(APACHE custom)
11 depends=('java-environment>=8')
13 source=("https://github.com/JetBrains/kotlin/releases/download/v${pkgver/_/-}/kotlin-compiler-${pkgver/_/-}.zip")
14 sha512sums=('359c8d359bd43f68eee9c4fc0c1be473a19c42e4faf147fa42db233ce2ef3544d486f020b58c9ff6bf4857ba4c68275f762478da63c8bcc8628f6be09ea07648')
15 b2sums=('ca5cc9471793bd0acb9dab94461d215788a5b91bea2407081f8b0731e796116f7d16d6925f0a91cd9c40098ddcbc42d98b00a47c494c2bc1b97952d8f549cd90')
20 setconf kotlin DIR /usr/bin
21 setconf kotlinc-js DIR /usr/bin
22 setconf kotlinc-jvm DIR /usr/bin
23 setconf kotlinc KOTLIN_HOME /usr/share/$pkgname
30 install -Dm755 -t "$pkgdir/usr/bin" bin/kotlin
31 install -Dm755 -t "$pkgdir/usr/bin" bin/kotlinc
32 install -Dm755 -t "$pkgdir/usr/bin" bin/kotlinc-js
33 install -Dm755 -t "$pkgdir/usr/bin" bin/kotlinc-jvm
37 install -d "$pkgdir/usr/share/$pkgname/lib"
39 install -Dm644 "$jar" "$pkgdir/usr/share/$pkgname/lib"
43 cd "$srcdir/${pkgname}c/license"
44 install -d "$pkgdir/usr/share/licenses/$pkgname"
45 install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname"
46 install -Dm644 NOTICE.txt "$pkgdir/usr/share/licenses/$pkgname"
47 for txt in third_party/*.txt; do
48 install -Dm644 "$txt" "$pkgdir/usr/share/licenses/$pkgname"
51 # build.txt must be installed for for "-version" to work
52 cd $srcdir/${pkgname}c
53 install -Dm644 build.txt "$pkgdir/usr/share/$pkgname"
56 # getver: github.com/JetBrains/kotlin/releases/latest