summaryrefslogtreecommitdiff
path: root/libre/java-commons-io/PKGBUILD
blob: b87ea897a54902092d9aa733427e5ae69027d9c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer (Arch): Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor (Arch): Stefan Husmann <stefan-husmann@t-online.de>
# Contributor (Arch): Simon Lipp <sloonz+aur@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pkgname=commons-io
pkgname=java-${_pkgname}
pkgver=2.4
pkgrel=2.parabola1
pkgdesc="IO related classes for Java."
arch=('any')
url="https://commons.apache.org/io/"
license=('APACHE')
depends=('java-runtime')
makedepends=('apache-ant' 'jh')
source=("https://archive.apache.org/dist/commons/io/source/${_pkgname}-${pkgver}-src.tar.gz")
md5sums=('a3e251952d75991fc8df40ad6b605094')

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}-src"
  ant jar javadoc -Dcomponent.version=2.4
}

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}-src"

  # Install license file
  install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"

  # Install documentation
  install -d "${pkgdir}/usr/share/doc/${pkgname}"
  cp -r "target/apidocs" "${pkgdir}/usr/share/doc/${pkgname}"

  # Install Maven artifacts
  export DESTDIR=${pkgdir}
  jh mvn-install ${_pkgname} ${_pkgname} ${pkgver} \
    "${srcdir}/${_pkgname}-${pkgver}-src/pom.xml" \
    "${srcdir}/${_pkgname}-${pkgver}-src/target/${_pkgname}-${pkgver}.jar" \
    "${_pkgname}-${pkgver}.jar"
  ln -s "/usr/share/java/${_pkgname}-${pkgver}.jar" \
    "${pkgdir}/usr/share/java/${_pkgname}.jar"
}