diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-05-28 02:19:22 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-05-28 02:19:22 -0300 |
commit | 3936f9de3f61fa9663fbb0ea8c57fd9f97eafc30 (patch) | |
tree | 28d468288e89ff417ad8331702a8570b851e0eeb /java | |
parent | e8b0a3e3ed518e494c79ed5c24123de84609f8e7 (diff) | |
parent | ff237a437bab2305ee31caf3792f6427e75be1cf (diff) |
Merge branch 'master' of ssh://projects.parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'java')
-rw-r--r-- | java/closure-compiler/PKGBUILD | 69 |
1 files changed, 46 insertions, 23 deletions
diff --git a/java/closure-compiler/PKGBUILD b/java/closure-compiler/PKGBUILD index 8c9ea0c34..8a54111ee 100644 --- a/java/closure-compiler/PKGBUILD +++ b/java/closure-compiler/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> pkgname=closure-compiler -pkgver=20131118 +pkgver=20140508 pkgdesc="A JavaScript optimizing compiler." -url="https://code.google.com/closure/compiler/" +url="https://developers.google.com/closure/compiler/" license=('Apache') pkgrel=1 @@ -12,56 +12,79 @@ depends=('java-runtime' 'sh') makedepends=( 'apache-ant' #'java-args4j' # does not exist - #'google-caja' # does not exist #'java-guava' # does not build 'java-jarjar' 'java-json' #'java-jsr305' # does not exist 'junit' #'java-protobuf' # does not build - #'maven-ant-tasks' # does not exist + #'java-mockito-core' # does not exist + #'java-objenesis' # does not exist 'jh' ) -source=("libre://$pkgname-$pkgver.tar.gz" 'closure-compiler.sh') -md5sums=('0fceda3f4d43a6d266f9888e7683bdc9' +source=("https://repo.parabolagnulinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz" 'closure-compiler.sh') +md5sums=('b5f5d88d0f9e5b314bc9351e9d4289de' 'd4ead4585fcc7039d3c32eb5c4491bb9') -mksource=("$pkgname-$pkgver::git+https://code.google.com/p/closure-compiler/#tag=v${pkgver}") +mkdepends=(git) +mksource=("$pkgname-$pkgver::git+https://github.com/google/closure-compiler.git#tag=v${pkgver}") mkmd5sums=('SKIP') -build() { +mksource() { + cd "$srcdir/$pkgname-$pkgver" + + sed -i " + /<target name=\"relversion\">/,/<\/target>/ { + s/executable=\"git\"/executable=\"echo\"/ + /<arg/d + /<\/exec>/i<arg value=\"v${pkgver}\" /> + }" \ + build.xml + + sed -i "s/1\.0-SNAPSHOT/v${pkgver}/g" \ + externs/pom.xml \ + lib/rhino/pom.xml \ + pom.xml \ + pom-main.xml +} + +prepare() { cd "$srcdir/$pkgname-$pkgver" 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/args4.jar lib/args4j.jar - #ln -sf /usr/share/java/caja-r4314.jar lib/caja-r4314.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/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 /... tools/maven-ant-tasks-2.1.3.jar - - sed -i " -/<target name=\"relversion\">/,/<\/target>/ { - s/executable=\"git\"/executable=\"echo\"/ - /<arg/d - /<\/exec>/i<arg value=\"v${pkgver}\" /> -}" build.xml +} - ant jar pom +build() { + cd "$srcdir/$pkgname-$pkgver" + ant jar } package() { cd "$srcdir" install -Dm755 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 + cd "$srcdir/$pkgname-$pkgver" - DESTDIR="$pkgdir" jh mvn-install \ - com.google.javascript closure-compiler v${pkgver} \ - build/pom.xml build/compiler.jar \ - closure-compiler.jar + ( + 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 + ) } |