aboutsummaryrefslogtreecommitdiffstats
path: root/testing/closure-compiler
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-01 14:39:11 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-03 00:03:02 +0200
commit859e833c8812ac35afe4bc759e90924d29d91f5d (patch)
treee6b4a9f36bea39219c33765b59fbdfba14fc667c /testing/closure-compiler
parent00d0d3d5ef7df92a69433f5ce825e9cea5871d4a (diff)
downloadaports-859e833c8812ac35afe4bc759e90924d29d91f5d.tar.bz2
aports-859e833c8812ac35afe4bc759e90924d29d91f5d.tar.xz
testing/closure-compiler: new aport
https://developers.google.com/closure/compiler/ A JavaScript checker and optimizer
Diffstat (limited to 'testing/closure-compiler')
-rw-r--r--testing/closure-compiler/APKBUILD32
-rw-r--r--testing/closure-compiler/closure-compiler4
2 files changed, 36 insertions, 0 deletions
diff --git a/testing/closure-compiler/APKBUILD b/testing/closure-compiler/APKBUILD
new file mode 100644
index 0000000000..30ecd58aad
--- /dev/null
+++ b/testing/closure-compiler/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# TODO: Build it from source instead of downloading prebuilt JAR (although
+# it does not contain any native binaries), so we can patch it when needed.
+pkgname=closure-compiler
+pkgver=20170218
+pkgrel=0
+pkgdesc="A JavaScript checker and optimizer"
+url="https://developers.google.com/closure/compiler/"
+arch="noarch"
+license="ASL-2.0"
+depends="openjdk8-jre-base"
+source="$pkgname-$pkgver-jar.tar.gz::http://dl.google.com/$pkgname/compiler-$pkgver.tar.gz
+ $pkgname"
+builddir="$srcdir/$pkgname-$pkgver"
+
+check() {
+ java -jar "$srcdir"/$pkgname-v$pkgver.jar --version
+}
+
+package() {
+ cd "$srcdir"
+
+ install -D -m 644 $pkgname-v$pkgver.jar \
+ "$pkgdir"/usr/share/java/$pkgname-$pkgver.jar
+ ln -s $pkgname-$pkgver.jar "$pkgdir"/usr/share/java/$pkgname.jar
+
+ install -D -m 755 $pkgname "$pkgdir"/usr/bin/$pkgname
+}
+
+sha512sums="4ddbb339615edb104ddcb84775b1da2f096d49dc921b70c5094a7b7afba25e40c1212bbc9f0e51ad643a3a72bfc46a301efcadd7909d09a77d0bb5e68e41bd81 closure-compiler-20170218-jar.tar.gz
+18127beb77da790d1fa13fddc4056c485ca2b4a263becd7d37542dc705d08c342f842aa22322dd9aaa8e0ad651f45fc4c0ff632201cc5f20d391843d2c1b2661 closure-compiler"
diff --git a/testing/closure-compiler/closure-compiler b/testing/closure-compiler/closure-compiler
new file mode 100644
index 0000000000..65e6560ddd
--- /dev/null
+++ b/testing/closure-compiler/closure-compiler
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+JAVA_HOME=${JAVA_HOME:="/usr/lib/jvm/default-jvm"}
+"$JAVA_HOME"/bin/java -jar /usr/share/java/closure-compiler.jar "$@"