PKGBUILD 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  2. pkgbase=rhino
  3. pkgname=('java-rhino' 'rhino-javadoc')
  4. pkgver=1.7.7.2
  5. _pkgver=${pkgver//\./_}
  6. pkgrel=1
  7. pkgrel+=.par1
  8. arch=('any')
  9. url="http://www.mozilla.org/rhino/"
  10. license=('MPL')
  11. makedepends=('apache-ant' 'jh')
  12. source=(https://github.com/mozilla/${pkgbase}/archive/Rhino${_pkgver}_Release.tar.gz)
  13. sha512sums=('39675c064fc902678e15baec546986a78d6109ab1cbceae5166773607abcec527ae533ea4540ee67501a5ca02a9dcc467267e722af21b93e72fdb2ede1935ad8')
  14. prepare() {
  15. cd "${srcdir}/${pkgbase}-Rhino${_pkgver}_Release"
  16. rm -v testsrc/tests/src/jstests.jar
  17. rm -v testsrc/org/mozilla/javascript/tests/commonjs/module/modules.jar
  18. }
  19. build() {
  20. cd "${srcdir}/${pkgbase}-Rhino${_pkgver}_Release"
  21. ant \
  22. jar \
  23. javadoc
  24. }
  25. package_java-rhino() {
  26. pkgdesc="Open-source implementation of JavaScript written entirely in Java - JAR"
  27. depends=('java-runtime-headless')
  28. cd ${srcdir}/${pkgbase}-Rhino${_pkgver}_Release
  29. # Install Maven artifacts
  30. export DESTDIR=${pkgdir}
  31. jh mvn-install "org.mozilla" ${pkgbase} ${pkgver} \
  32. "maven/maven-pom.xml" \
  33. "build/${pkgbase}${pkgver}/js.jar" \
  34. "js-${pkgver}.jar"
  35. ln -s "/usr/share/java/js-${pkgver}.jar" \
  36. "${pkgdir}/usr/share/java/js.jar"
  37. }
  38. package_rhino-javadoc() {
  39. pkgdesc="Open-source implementation of JavaScript written entirely in Java - Javadoc"
  40. cd ${srcdir}/${pkgbase}-Rhino${_pkgver}_Release
  41. install -m755 -d ${pkgdir}/usr/share/${pkgbase}
  42. cp -r build/${pkgbase}${pkgver}/javadoc ${pkgdir}/usr/share/${pkgbase}
  43. }