PKGBUILD 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # $Id$
  2. # Maintainer (Arch): AndyRTR <andyrtr at archlinux.org>
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. pkgname=beanshell
  5. _pkgname=bsh
  6. pkgver=2.0b6
  7. pkgrel=1.parabola1
  8. pkgdesc="Small, free, embeddable, source level Java interpreter with object based scripting language features written in Java"
  9. arch=('any')
  10. url="https://github.com/beanshell/beanshell"
  11. license=('Apache')
  12. depends=('java-runtime')
  13. provides=('bsh')
  14. replaces=('beanshell2')
  15. conflicts=('beanshell2')
  16. makedepends=('apache-ant' 'java-commons-bsf2' 'jh' 'tomcat7')
  17. source=("https://github.com/beanshell/beanshell/releases/download/$pkgver/bsh-$pkgver-src.zip")
  18. sha1sums=('76497846de1f3d2ef438d79e31328107658d10be')
  19. # beanshell2 fork is dead
  20. # http://stackoverflow.com/questions/26549307/current-state-of-beanshell
  21. # https://github.com/stain/beanshell2 - google code got removed and only this fork is left and outdated
  22. # original url http://www.beanshell.org - unmaintained
  23. # Fedora and our only package making use of it use the follow up of the old beanshell:
  24. # https://github.com/beanshell/beanshell
  25. prepare() {
  26. cd "$srcdir/BeanShell-$pkgver"
  27. rm -v $(find . -name \*.jar)
  28. ln -s /usr/share/java/tomcat7/servlet-api.jar lib/servlet.jar
  29. }
  30. build() {
  31. cd "$srcdir/BeanShell-$pkgver"
  32. ant dist
  33. }
  34. package() {
  35. cd "$srcdir/BeanShell-$pkgver"
  36. # Install license file
  37. install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  38. # Install documentation
  39. install -d "$pkgdir/usr/share/doc/$pkgname"
  40. cp -r javadoc "$pkgdir/usr/share/doc/$pkgname"
  41. # Install Maven artifact
  42. export DESTDIR=$pkgdir
  43. jh mvn-install org.apache-extras.beanshell bsh $pkgver \
  44. "dist/${_pkgname}-$pkgver.pom" \
  45. "dist/${_pkgname}-$pkgver.jar" \
  46. "${_pkgname}-$pkgver.jar"
  47. ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
  48. "$pkgdir/usr/share/java/${_pkgname}.jar"
  49. # Install jars
  50. for _jar in bsf classgen classpath commands core engine reflect util; do
  51. install -Dm644 dist/${_pkgname}-${_jar}-$pkgver.jar \
  52. "${pkgdir}/usr/share/java/${_pkgname}-${_jar}.jar"
  53. done
  54. }