PKGBUILD 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  2. pkgname=clojure
  3. pkgver=1.8.0
  4. pkgrel=1.parabola2
  5. pkgdesc='LISP for the JVM'
  6. url='http://clojure.org/'
  7. arch=('any')
  8. license=('EPL')
  9. depends=('java-environment' 'bash' 'java-asm')
  10. makedepends=('apache-ant' 'classpath' 'git' 'java-asm' 'jh')
  11. optdepends=('rlwrap: friendlier shell with readline support')
  12. install='clojure.install'
  13. source=("$pkgname::git://github.com/clojure/clojure.git#tag=$pkgname-$pkgver"
  14. 'clojure-replace_asm.patch'
  15. 'LICENSE.txt'
  16. 'clj.sh' "$pkgname.sh")
  17. sha256sums=('SKIP'
  18. 'eb5323ca0ff21d1fb3110f059ff1ce47251f1421d1b1b4e4a6958f3c1d0ab8b3'
  19. '9bcd4c6eac491d1c9bbade5b35182a778fc7e08021de30edc387ac2adce75035'
  20. 'd51083832d169df8cc61bd13c049e224178c2ad1c35c720509db55f4d090436b'
  21. 'e4b82b88a32982079eb3d30b56332cb4f9f10068b8b1217c4e963081c11a04e0')
  22. prepare() {
  23. cd "$pkgname"
  24. rm -rv "src/jvm/clojure/asm"
  25. patch -Np1 -i ../clojure-replace_asm.patch
  26. }
  27. build() {
  28. cd "$pkgname"
  29. ant jar javadoc
  30. }
  31. package() {
  32. cd "$pkgname"
  33. # Install license file
  34. install -Dm644 "${srcdir}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  35. # Install documentation
  36. install -d "${pkgdir}/usr/share/doc/${pkgname}"
  37. cp -r "target/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
  38. # Install Maven artifacts
  39. export DESTDIR=${pkgdir}
  40. jh mvn-install "org.${pkgname}" ${pkgname} ${pkgver} \
  41. "pom.xml" \
  42. "${pkgname}-${pkgver}.jar" \
  43. "${pkgname}-${pkgver}.jar"
  44. ln -s "/usr/share/java/${pkgname}-${pkgver}.jar" \
  45. "${pkgdir}/usr/share/java/${pkgname}.jar"
  46. install -Dm755 "${srcdir}/clj.sh" "$pkgdir/usr/bin/clj"
  47. install -Dm755 "${srcdir}/clj.sh" "$pkgdir/usr/bin/clojure"
  48. install -Dm755 "${srcdir}/$pkgname.sh" "$pkgdir/etc/profile.d/$pkgname.sh"
  49. }