PKGBUILD 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  2. # This program is free software: you can redistribute it and/or modify
  3. # it under the terms of the CC0 1.0 License.
  4. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  5. pkgname=java-assertj
  6. pkgver=3.8.0
  7. pkgrel=1
  8. pkgdesc="assertions java library"
  9. arch=('any')
  10. url='https://assertj.github.io/doc/#assertj-core'
  11. license=('APACHE')
  12. depends=('java-runtime')
  13. makedepends=('cglib' 'jh' 'junit' 'java-hamcrest')
  14. source=("https://github.com/assertj/assertj-core/archive/refs/tags/assertj-core-${pkgver}.tar.gz")
  15. sha512sums=('ca01bb9323f67c663ca80fed08bcdccedfa28a238231ac141f075bfddef9cc09e18a21af3a12a11ede73111f48a73db9e5a7728bba39c16b5b46c935a3f6cd20')
  16. prepare() {
  17. cd "${srcdir}/assertj-core-assertj-core-${pkgver}"
  18. mkdir -p build/classes
  19. }
  20. build(){
  21. cd "${srcdir}/assertj-core-assertj-core-${pkgver}"
  22. CLASSPATH=""
  23. CLASSPATH="${CLASSPATH}:/usr/share/java/cglib.jar"
  24. CLASSPATH="$CLASSPATH:/usr/share/java/junit.jar"
  25. CLASSPATH="$CLASSPATH:/usr/share/java/hamcrest-all.jar"
  26. javac -cp "${CLASSPATH}" -d build/classes \
  27. $(find "src/main/java" -name \*.java)
  28. jar -cvf "assertj.jar" -C "build/classes" .
  29. }
  30. package(){
  31. cd "${srcdir}/assertj-core-assertj-core-${pkgver}"
  32. export DESTDIR=${pkgdir}
  33. jh mvn-install "org.assertj" "assertj-core" ${pkgver} \
  34. "${srcdir}/assertj-core-${pkgver}.pom" \
  35. "assertj.jar" \
  36. "assertj.jar"
  37. ln -s "/usr/share/java/assertj.jar" \
  38. "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
  39. }