diff options
Diffstat (limited to 'libre/rhino/PKGBUILD')
-rw-r--r-- | libre/rhino/PKGBUILD | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libre/rhino/PKGBUILD b/libre/rhino/PKGBUILD new file mode 100644 index 000000000..f0390d58d --- /dev/null +++ b/libre/rhino/PKGBUILD @@ -0,0 +1,59 @@ +# $Id$ +# Maintainer: Andreas Radke <andyrtr@archlinux.org> +# Maintainer: Guillaume ALAUX <guillaume@archlinux.org> +# Contributor: Jan de Groot <jgc@archlinux.org> +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +pkgbase=rhino +pkgname=('java-rhino' 'rhino-javadoc') +pkgver=1.7.6 +_pkgver=${pkgver//\./_} +pkgrel=1.parabola1 +arch=('any') +url="http://www.mozilla.org/rhino/" +license=('MPL') +makedepends=('apache-ant' 'jh') +source=(https://github.com/mozilla/${pkgbase}/releases/download/Rhino${_pkgver}_RELEASE/${pkgbase}${pkgver}.zip + https://repo.maven.apache.org/maven2/org/mozilla/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.pom) +sha256sums=('45f4431699887a72a7f383ef927ef1b2e79d1fe597260af8df11ea93255b10f5' + '576f868e3e823d395bf645d0cab9d9dafc74ea172ebed7fcd2603542b981f3cb') + +prepare() { + cd "${srcdir}/${pkgbase}${pkgver}" + rm -rv javadoc + rm -v javadoc.zip js.jar + rm -v testsrc/tests/src/jstests.jar + rm -v testsrc/org/mozilla/javascript/tests/commonjs/module/modules.jar +} + +build() { + cd "${srcdir}/${pkgbase}${pkgver}" + ant \ + jar \ + javadoc +} + +package_java-rhino() { + pkgdesc="Open-source implementation of JavaScript written entirely in Java - JAR" + depends=('java-runtime-headless') + + cd ${srcdir}/${pkgbase}${pkgver}/build/${pkgbase}${pkgver} + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install "org.mozilla" ${pkgbase} ${pkgver} \ + "${srcdir}/${pkgbase}-${pkgver}.pom" \ + "js.jar" \ + "js.jar" + + ln -s "/usr/share/java/js.jar" \ + "${pkgdir}/usr/share/java/js-${pkgver}.jar" +} + +package_rhino-javadoc() { + pkgdesc="Open-source implementation of JavaScript written entirely in Java - Javadoc" + + cd ${srcdir}/${pkgbase}${pkgver}/build/${pkgbase}${pkgver} + install -m755 -d ${pkgdir}/usr/share/${pkgbase} + cp -r javadoc ${pkgdir}/usr/share/${pkgbase} +} |