PKGBUILD 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  2. pkgname=jedit
  3. pkgver=5.4.0
  4. pkgrel=5.parabola1
  5. pkgdesc='Editor for programmers'
  6. arch=('any')
  7. url='http://jedit.org/'
  8. license=('GPL')
  9. depends=('java-runtime>=8')
  10. makedepends=('java-environment=8' 'apache-ant' 'apache-ant-contrib' 'apache-ivy' 'beanshell' 'docbook-xsl-saxon'
  11. 'gendesk' 'java-hamcrest' 'jsr305' 'junit' 'xerces2-java')
  12. optdepends=('noto-fonts: usable font')
  13. options=('!emptydirs')
  14. source=("http://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/jedit${pkgver}source.tar.bz2"
  15. 'jedit.sh' 'jeditbg.sh' 'jedit.props' 'jedit-fix_build.patch')
  16. sha256sums=('b42dec6c81936b8974308f03c8f356487586cec782d79659b8ae67953c8edf71'
  17. '91d9b4b0c4855c9624ceea8c6b40c90b53fb15a020b6d954f4bb6b4b934e0348'
  18. '5cf267b6ee1f908ee7e9a830dc98f03a3a4a53db2822fce6a2cb5ed02d444c69'
  19. 'dc5fe0050321d4f34bce556895fbc39cc6f7df194e14eb4f6ea53166a4d82347'
  20. '1d747fb3d4b0d4af3d3e752d92858067e02e8160d4d22cf820bd9f45c0fff90b')
  21. prepare() {
  22. gendesk -f -n \
  23. --pkgname "$pkgname" \
  24. --pkgdesc "$pkgdesc" \
  25. --exec 'jeditbg %U' \
  26. --name jEdit \
  27. --genericname Editor
  28. cd jEdit
  29. mkdir -p lib/{ant-contrib,compile,docbook,ivy,default-plugins,scripting,test}
  30. ln -sf /usr/share/java/ant-contrib.jar lib/ant-contrib/ant-contrib.jar
  31. ln -sf /usr/share/java/apache-ivy/ivy.jar lib/ivy/ivy.jar
  32. ln -sf /usr/share/java/bsh.jar lib/ant-contrib/bsh.jar
  33. ln -sf /usr/share/java/docbook-xsl-saxon.jar lib/docbook/docbook-xsl-saxon.jar
  34. ln -sf /usr/share/java/saxon.jar lib/docbook/saxon.jar
  35. ln -sf /usr/share/java/xercesImpl.jar lib/docbook/xercesImpl.jar
  36. ln -sf /usr/share/java/hamcrest-core.jar lib/test/hamcrest-core.jar
  37. ln -sf /usr/share/java/hamcrest-library.jar lib/test/hamcrest-library.jar
  38. ln -sf /usr/share/java/jsr305.jar lib/compile/jsr305.jar
  39. ln -sf /usr/share/java/junit.jar lib/test/junit.jar
  40. patch -Np1 -i "${srcdir}/jedit-fix_build.patch"
  41. }
  42. build() {
  43. cd jEdit
  44. export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
  45. ant build docs-html \
  46. -Divy.done=true
  47. }
  48. package() {
  49. cd jEdit
  50. # Install documentation
  51. install -d "$pkgdir/usr/share/java/$pkgname"
  52. cp -r build/doc "$pkgdir/usr/share/java/$pkgname"
  53. # Install jars
  54. install -D -m644 build/$pkgname.jar "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
  55. # Install keymaps
  56. cp -r build/keymaps "${pkgdir}/usr/share/java/${pkgname}"
  57. # Install macros
  58. cp -r build/macros "${pkgdir}/usr/share/java/${pkgname}"
  59. # Install modes
  60. cp -r build/modes "${pkgdir}/usr/share/java/${pkgname}"
  61. # Install properties
  62. cp -r build/properties "${pkgdir}/usr/share/java/${pkgname}"
  63. # Install startup
  64. cp -r build/startup "${pkgdir}/usr/share/java/${pkgname}"
  65. # Man pages
  66. install -Dm644 package-files/linux/$pkgname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
  67. install -d "$pkgdir/usr/bin"
  68. install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  69. install -Dm755 "$srcdir/${pkgname}bg.sh" "$pkgdir/usr/bin/${pkgname}bg"
  70. install -Dm644 "$srcdir/$pkgname.props" "$pkgdir/usr/share/$pkgname/default.props"
  71. install -Dm644 doc/$pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
  72. install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  73. }