summaryrefslogtreecommitdiff
path: root/libre/java-commons-io/PKGBUILD
blob: ebe9b4147858898c2c1fda3c448c5a2325545e5c (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 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.11.0
pkgrel=1.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"{,.asc})
sha256sums=('5a55361cf2b97228f94b3c65e3a4af784581debe322be551c44b2776db1c6483'
            'SKIP')
sha512sums=('e2ab8ebc9c328093a460f8f5f96c80bb45f5073ec7aaa0beabdcdeac2e97324292eab2e2cb8b64d8e78b2c5d89048ba84e50daa0965dffcbe2fd0da7ab789ee3'
            'SKIP')
validpgpkeys=('2DB4F1EF0FA761ECC4EA935C86FDC7E2A11262CB') # Gary David Gregory (Code signing key) <ggregory@apache.org>
prepare() {
  cd "${srcdir}/${_pkgname}-${pkgver}-src"
  mkdir -p build/classes
}

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

  CLASSPATH="/usr/share/java/junit.jar"
  javac -cp "${CLASSPATH}" -d "build/classes" -encoding UTF-8 \
    $(find "src" -name \*.java)


  # javadoc -classpath $CLASSPATH -d "build/javadoc" \
  #   -sourcepath "src" -subpackages org

  # jar -cvf "${pkgname}.jar" -C "build/classes" .
}

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} \
    pom.xml \
    "target/${_pkgname}-${pkgver}.jar" \
    "${_pkgname}-${pkgver}.jar"
  ln -s "/usr/share/java/${_pkgname}-${pkgver}.jar" \
    "${pkgdir}/usr/share/java/${_pkgname}.jar"
}