# Maintainer: Omar Vega Ramos pkgbase=rhino pkgname=('java-rhino' 'rhino-javadoc') pkgver=1.7.7.1 _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}/archive/Rhino${_pkgver}_RELEASE.tar.gz) sha256sums=('fb44d67e3c83cbf7615afa55d5153d10a3ac73ad75ee68e818d548839368b73b') prepare() { cd "${srcdir}/${pkgbase}-Rhino${_pkgver}_RELEASE" rm -v testsrc/tests/src/jstests.jar rm -v testsrc/org/mozilla/javascript/tests/commonjs/module/modules.jar } build() { cd "${srcdir}/${pkgbase}-Rhino${_pkgver}_RELEASE" ant \ jar \ javadoc } package_java-rhino() { pkgdesc="Open-source implementation of JavaScript written entirely in Java - JAR" depends=('java-runtime-headless') cd ${srcdir}/${pkgbase}-Rhino${_pkgver}_RELEASE # Install Maven artifacts export DESTDIR=${pkgdir} jh mvn-install "org.mozilla" ${pkgbase} ${pkgver} \ "maven/maven-pom.xml" \ "build/${pkgbase}${pkgver}/js.jar" \ "js-${pkgver}.jar" ln -s "/usr/share/java/js-${pkgver}.jar" \ "${pkgdir}/usr/share/java/js.jar" } package_rhino-javadoc() { pkgdesc="Open-source implementation of JavaScript written entirely in Java - Javadoc" cd ${srcdir}/${pkgbase}-Rhino${_pkgver}_RELEASE install -m755 -d ${pkgdir}/usr/share/${pkgbase} cp -r build/${pkgbase}${pkgver}/javadoc ${pkgdir}/usr/share/${pkgbase} }