PKGBUILD 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  2. pkgname=opentest4j
  3. pkgver=1.2.0
  4. pkgrel=1
  5. pkgdesc='Minimal common foundation for testing libraries for Java'
  6. arch=('any')
  7. url='https://github.com/ota4j-team/opentest4j'
  8. license=('Apache')
  9. depends=('java-environment' 'java-runtime')
  10. makedepends=('jh')
  11. source=("https://github.com/ota4j-team/${pkgname}/archive/refs/tags/r${pkgver}.tar.gz")
  12. sha512sums=('cd98d976935de97d259ec4c04510334f2b56f8a32db2c97e0f20a2e3b99f119ffeb390589eb42d4594808d96194067871d5eaad6a40dd58af30b9f995b13ef08')
  13. prepare() {
  14. cd "${srcdir}/${pkgname}-r${pkgver}"
  15. mkdir -p "${srcdir}/dist/classes"
  16. mkdir -p "${srcdir}/dist/source"
  17. }
  18. build() {
  19. cd "${srcdir}/${pkgname}-r${pkgver}"
  20. javac \
  21. -classpath "${CLASSPATH}" \
  22. -d "classes" \
  23. -encoding UTF-8 \
  24. $(find "src/main/java/" -name \*.java)
  25. jar -cvf "${pkgname}.jar" \
  26. -C "classes" .
  27. javadoc \
  28. -d "build/javadoc" \
  29. -encoding UTF-8 \
  30. -sourcepath "src/main/java" \
  31. org.opentest4j
  32. }
  33. package() {
  34. cd "${srcdir}/${pkgname}-r${pkgver}"
  35. # CONTRIBUTING.md has the project license statement:
  36. # **Project License:** [Apache License Version 2.0](LICENSE)
  37. install -Dm644 \
  38. LICENSE CONTRIBUTING.md \
  39. -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  40. export DESTDIR="$pkgdir"
  41. jh mvn-install ${pkgname} ${pkgname} ${pkgver} \
  42. pom.xml \
  43. "${pkgname}.jar" \
  44. "${pkgname}.jar"
  45. ln -s "/usr/share/java/${pkgname}.jar" \
  46. "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
  47. }