PKGBUILD 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  2. # Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
  3. # Contributor (Arch): James Spencer <james.s.spencer@gmail.com>
  4. # parabola changes and rationale:
  5. # - arch package not built from source
  6. pkgname=jmol
  7. pkgver=14.29.54
  8. pkgrel=1
  9. pkgrel+=.parabola1
  10. pkgdesc="a Java 3D viewer for chemical structures"
  11. arch=(any)
  12. url="http://jmol.sourceforge.net"
  13. license=(LGPL)
  14. depends=('jre8-openjdk')
  15. makedepends=('apache-ant-contrib' 'icedtea-web' 'java-commons-cli' 'java-naga' 'jdk8-openjdk' 'saxon6' 'unzip')
  16. source=("https://downloads.sourceforge.net/jmol/Jmol-$pkgver-full.tar.gz"
  17. 'jmol-dontsign.patch'
  18. 'jmol-build.patch')
  19. sha256sums=('3f95a4b860f355e18e83df2ecb619802fa09d4d8ff6171b87ece79ed6e5adce8'
  20. '5ba0a1feb1a0ced57d285885747a32b31cca424f286fbae6112522dcb3d6d915'
  21. '1d37510f8fd0d3a75382c7f0bbb0d6fc3308e4e26295774c10d1f8ae53eef3f4')
  22. prepare() {
  23. cd $pkgname-$pkgver
  24. rm src/com/sparshui/cpp/HPTouchSmart/*.{dll,exe}
  25. rm -v {.,jars,plugin-jars,tools}/*.jar
  26. rm -v doc/jcfl-*.tar.gz
  27. rm -v jsmol.zip
  28. patch -Np1 -i ../jmol-dontsign.patch
  29. patch -Np1 -i ../jmol-build.patch
  30. ln -sf /usr/share/icedtea-web/jsobject.jar jars/netscape.jar
  31. ln -sf /usr/share/java/commons-cli.jar jars/commons-cli-1.2.jar
  32. ln -sf /usr/share/java/naga-3_0.jar jars/naga-3_0.jar
  33. ln -sf /usr/share/java/saxon.jar jars/saxon.jar
  34. }
  35. build() {
  36. cd $pkgname-$pkgver
  37. ant classes -lib /usr/share/java/ant-contrib.jar
  38. jar -cvf jars/JSpecView.jar -C build/classes/ jspecview
  39. ant init jar applet-jar doc -lib /usr/share/java/ant-contrib.jar
  40. }
  41. package() {
  42. cd $pkgname-$pkgver
  43. # Install license file
  44. install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
  45. # Install documentation
  46. install -d "$pkgdir/usr/share/doc/$pkgname"
  47. cp -r build/javadoc "$pkgdir/usr/share/doc/$pkgname"
  48. # Install jsmol
  49. unzip appletweb/jsmol.zip -d "$pkgdir/usr/share/"
  50. # Install jmol
  51. install -d "$pkgdir/usr/share/$pkgname"
  52. cp build/{Jmol,JmolData,JmolLib}.jar "$pkgdir/usr/share/$pkgname"
  53. cp jars/JSpecView.jar "$pkgdir/usr/share/$pkgname"
  54. install -m755 build/jmol.sh "$pkgdir/usr/share/$pkgname/jmol.sh"
  55. install -d "$pkgdir/usr/bin"
  56. ln -s "/usr/share/$pkgname/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  57. }