PKGBUILD 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Maintainer (Arch): Guillaume ALAUX <guillaume@archlinux.org>
  2. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  3. _libname=commons-net
  4. pkgname=java-${_libname}1
  5. pkgver=1.4.1
  6. pkgrel=3.parabola1
  7. pkgdesc="Apache library that implements the client side of many basic Internet protocols"
  8. arch=('any')
  9. url="http://commons.apache.org/net/"
  10. license=('APACHE')
  11. depends=('java-runtime-headless')
  12. makedepends=('apache-ant' 'jakarta-oro' 'jh')
  13. source=("https://archive.apache.org/dist/commons/net/source/${_libname}-${pkgver}-src.tar.gz")
  14. sha512sums=('6ac697536eff947cd0aa828c887e9cc4046c49a593c760bbc59db7e04cf0d7456e84d22504cfa2f6915315dc061e3499382f05bd7740bf79a532a4d9d42c0da8')
  15. build() {
  16. cd "${srcdir}/${_libname}-${pkgver}"
  17. ant dist -Dnoget=true -lib "/usr/share/java/jakarta-oro.jar"
  18. }
  19. package() {
  20. cd "${srcdir}/${_libname}-${pkgver}"
  21. # Install license file
  22. install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  23. # Install documentation
  24. install -d "${pkgdir}/usr/share/doc/${pkgname}"
  25. cp -r "dist/docs/api" "${pkgdir}/usr/share/doc/${pkgname}"
  26. cp -r "src/java/examples" "${pkgdir}/usr/share/doc/${pkgname}/examples"
  27. # Install Maven artifacts
  28. export DESTDIR=${pkgdir}
  29. jh mvn-install ${_libname} ${_libname} ${pkgver} \
  30. "${srcdir}/${_libname}-${pkgver}/project.xml" \
  31. "${srcdir}/${_libname}-${pkgver}/target/${_libname}-${pkgver}.jar" \
  32. "${_libname}.jar"
  33. ln -s "/usr/share/java/${_libname}.jar" \
  34. "${pkgdir}/usr/share/java/${_libname}-${pkgver}.jar"
  35. }