PKGBUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Maintainer (Arch): Guillaume ALAUX <Guillaume at Arch Linux dot org>
  2. # Rationale: Arch version isn't built from source.
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. pkgname=junit
  5. pkgver=4.12
  6. pkgrel=2.parabola1
  7. pkgdesc='Simple JVM framework to write repeatable tests'
  8. arch=('any')
  9. url='http://www.junit.org/'
  10. license=('EPL')
  11. depends=('java-runtime' 'java-hamcrest')
  12. makedepends=('apache-ant' 'jh')
  13. source=("https://github.com/junit-team/${pkgname}/archive/r${pkgver}.tar.gz"
  14. "build.xml")
  15. sha512sums=('ba612598fa6c328e8f4bbea3afda08b459a110837ca3805a62e811535f7bca8d04509f8fe51a413c7bc855fccee35d6946c9eece4dd01726d12454c002a4de32'
  16. '0ddf2f8ad2b42b427198227be323335eef16a8f189bbff8c8b0a6dc28fea2b6c47c847667f3c745ee696c79f5690424b74be8b0de42e9f89f4b93e403cb679a1')
  17. prepare() {
  18. cd "${srcdir}/${pkgname}4-r${pkgver}"
  19. rm -rv lib/*.jar
  20. mv ../build.xml .
  21. ln -sf /usr/share/java/hamcrest-core.jar lib/hamcrest-core-1.3.jar
  22. }
  23. build() {
  24. cd "${srcdir}/${pkgname}4-r${pkgver}"
  25. ant dist
  26. }
  27. package() {
  28. cd "${srcdir}/${pkgname}4-r${pkgver}"
  29. # Install license file
  30. install -Dm644 LICENSE-junit.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  31. # Install documentation
  32. install -d "${pkgdir}/usr/share/doc/${pkgname}"
  33. cp -r "${pkgname}${pkgver}/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
  34. export DESTDIR="$pkgdir"
  35. jh mvn-install ${pkgname} ${pkgname} ${pkgver} \
  36. pom.xml \
  37. "${pkgname}${pkgver}/${pkgname}-${pkgver}.jar" \
  38. "${pkgname}.jar"
  39. ln -s "/usr/share/java/${pkgname}.jar" \
  40. "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
  41. }