summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa7fcbe8d9c8cf52d9d5503cbd8573e717398bc1 (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
pkgname=jaf-api
pkgver=2.1.3
pkgrel=2
pkgdesc="Jakarta Activation Specification project"
arch=(any)
url="https://github.com/jakartaee/${pkgname}"
license=(BSD-3-Clause)
depends=(java-runtime)
makedepends=(java-environment maven)
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('0ee7a1b44b789360fdfc3b1cd474f5b201ef31c34850cd8ccf68afc38679ab4740066e7a68bbef1c91ca56cde8b8bbb6b74d1f799494e134bf0519f50c31165e')
_M2_REPO=$(mktemp -d)

build() {
  cd ${pkgname}-${pkgver}/api

  if [[ -z "${JAVA_HOME}" ]]; then
    export JAVA_HOME=/usr/lib/jvm/default
  fi
  mvn -Dmaven.test.skip=true \
    -Dmaven.repo.local=${_M2_REPO} \
    clean install
}

check() {
  cd ${pkgname}-${pkgver}/api
  mvn test -Dmaven.repo.local=${_M2_REPO}
}

package() {
  cd ${pkgname}-${pkgver}/api
  install -Dm 644 target/jakarta.activation-api-${pkgver}.jar -t "${pkgdir}"/usr/share/java
  ln -s jakarta.activation-api-${pkgver}.jar "${pkgdir}"/usr/share/java/jakarta.activation-api.jar
  install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
}