summaryrefslogtreecommitdiff
path: root/libre/closure-compiler/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/closure-compiler/PKGBUILD')
-rw-r--r--libre/closure-compiler/PKGBUILD82
1 files changed, 45 insertions, 37 deletions
diff --git a/libre/closure-compiler/PKGBUILD b/libre/closure-compiler/PKGBUILD
index 62795277d..5778dd03c 100644
--- a/libre/closure-compiler/PKGBUILD
+++ b/libre/closure-compiler/PKGBUILD
@@ -1,31 +1,32 @@
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=closure-compiler
-pkgver=20160315
-pkgdesc="A JavaScript optimizing compiler."
-url="https://developers.google.com/closure/compiler/"
-license=('Apache')
-
+pkgver=20160517
pkgrel=1
+pkgdesc="Performs checking, instrumentation and optimizations on Javascript code."
arch=('any')
-depends=('java-runtime' 'sh')
+url="https://developers.google.com/closure/compiler/"
+license=('APACHE')
+depends=('java-runtime')
makedepends=(
'apache-ant'
- #'java-args4j' # does not exist
- #'java-guava' # does not build
- 'java-jarjar'
- 'java-json'
- #'java-jsr305' # does not exist
+ 'args4j'
+ 'java-guava'
+ #'java-jarjar'
+ 'java-gson'
+ 'jsr305'
'junit'
- #'java-protobuf' # does not build
+ 'protobuf-java'
#'java-mockito-core' # does not exist
- #'java-objenesis' # does not exist
+ #'objenesis' # does not exist
'jh'
)
-source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz" 'closure-compiler.sh')
-md5sums=('407efb1dad46bb7635c4e1857ac079b4'
- 'd4ead4585fcc7039d3c32eb5c4491bb9')
+source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz"
+ 'closure-compiler.sh')
+sha256sums=('72cbbf6c52bfbdd8a5b35f888f942feea74bf13984c7d2e6fdfc6737bd67f294'
+ '10b0d74a305548b029f05bd4fb0ffabec2ff782f9e3c054c2f5236f1bf4c6630')
mkdepends=(git)
mksource=("$pkgname-$pkgver::git+https://github.com/google/closure-compiler.git#tag=v${pkgver}")
@@ -33,6 +34,7 @@ mkmd5sums=('SKIP')
mksource() {
cd "$srcdir/$pkgname-$pkgver"
+ rm -rv lib/*.jar
sed -i "
/<target name=\"relversion\">/,/<\/target>/ {
@@ -53,37 +55,43 @@ prepare() {
ln -sf /opt/apache-ant/lib/ant.jar lib/ant.jar
ln -sf /opt/apache-ant/lib/ant-launcher.jar lib/ant-launcher.jar
- #ln -sf /usr/share/java/args4j.jar lib/args4j.jar
- #ln -sf /usr/share/java/guava.jar lib/guava.jar
- ln -sf /usr/share/java/jarjar.jar lib/jarjar.jar
- ln -sf /usr/share/java/json.jar lib/json.jar
- #ln -sf /usr/share/java/jsr305.jar lib/jsr305.jar
+ ln -sf /usr/share/java/args4j.jar lib/args4j.jar
+ ln -sf /usr/share/java/guava.jar lib/guava.jar
+ #ln -sf /usr/share/java/jarjar.jar lib/jarjar.jar
+ ln -sf /usr/share/java/gson.jar lib/gson.jar
+ ln -sf /usr/share/java/jsr305.jar lib/jsr305.jar
ln -sf /usr/share/java/junit.jar lib/junit.jar
#ln -sf /usr/share/java/mockito-core.jar lib/mockito-core.jar
#ln -sf /usr/share/java/objenesis.jar lib/objenesis.jar
- #ln -sf /usr/share/java/protobuf.jar lib/protobuf-java.jar
+ ln -sf /usr/share/java/protobuf.jar lib/protobuf-java.jar
}
build() {
cd "$srcdir/$pkgname-$pkgver"
- ant jar
+ ant jar javadoc
}
package() {
- cd "$srcdir"
- install -Dm755 closure-compiler.sh "$pkgdir"/usr/bin/closure-compiler
+ cd "$srcdir/$pkgname-$pkgver"
- # symlink for compatibility with Arch's [community]/closure-compiler
- ln -s closure-compiler "$pkgdir"/usr/bin/closure
+ # Install license file
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
- cd "$srcdir/$pkgname-$pkgver"
- (
- export DESTDIR="$pkgdir"
- jh mvn-install com.google.javascript closure-compiler-parent v${pkgver} pom.xml
- jh mvn-install com.google.javascript closure-compiler v${pkgver} pom-main.xml \
- build/compiler.jar closure-compiler.jar
- jh mvn-install com.google.javascript closure-compiler-externs v${pkgver} externs/pom.xml
- jh mvn-install com.google.javascript closure-compiler-rhino v${pkgver} lib/rhino/pom.xml \
- build/lib/rhino.jar
- )
+ # Install documentation
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r "build/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # Install Maven artifacts
+ export DESTDIR="${pkgdir}"
+ jh mvn-install com.google.javascript "${pkgname}-parent" "v${pkgver}" pom.xml
+ jh mvn-install com.google.javascript "${pkgname}-externs" "v${pkgver}" externs/pom.xml
+ jh mvn-install com.google.javascript "${pkgname}" "v${pkgver}" pom-main.xml \
+ build/compiler.jar "${pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}.jar"
+
+ install -Dm755 "${srcdir}/closure-compiler.sh" "${pkgdir}/usr/bin/closure-compiler"
+
+ # symlink for compatibility with Arch's [community]/closure-compiler
+ ln -s closure-compiler "${pkgdir}/usr/bin/closure"
}