diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-06-22 23:19:09 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-06-22 23:22:44 +0200 |
commit | e4c76d7926971b22232fb85b3fc65335264007cc (patch) | |
tree | 7aee08ed5af5ecbc8dad878ca28864e880c1721e /pcr/apiguardian | |
parent | a38785c36da43b2307126607cb69f92c6bd83e7b (diff) | |
download | abslibre-e4c76d7926971b22232fb85b3fc65335264007cc.tar.gz abslibre-e4c76d7926971b22232fb85b3fc65335264007cc.tar.bz2 abslibre-e4c76d7926971b22232fb85b3fc65335264007cc.zip |
pcr: Add apiguardian
This dependency is needed to update junit
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'pcr/apiguardian')
-rw-r--r-- | pcr/apiguardian/PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/apiguardian/PKGBUILD b/pcr/apiguardian/PKGBUILD new file mode 100644 index 000000000..882b9299f --- /dev/null +++ b/pcr/apiguardian/PKGBUILD @@ -0,0 +1,52 @@ +# Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +# This program is free software: you can redistribute it and/or modify +# it under the terms of the CC0 1.0 License. +# Maintainers: Parabola hackers <dev@lists.parabola.nu> + +pkgname=apiguardian +pkgver=1.1.2 +pkgrel=1 +pkgdesc='Java library that provides the `@API` annotation' +arch=('any') +url='https://apiguardian-team.github.io/apiguardian/docs/current/api/' +license=('Apache') +depends=('java-runtime') +makedepends=('jh') +source=("https://github.com/${pkgname}-team/${pkgname}/archive/refs/tags/r${pkgver}.tar.gz") +sha512sums=('7c56ee15e0aba07e95b6f2fe7cedd98e449e774958eb63b2467066c381e1e82ad67c982c2885e18154c62e55fda80a1c2e0f689253afe449db9f7e7563122db6') + +build() { + cd "${srcdir}/${pkgname}-r${pkgver}" + + mkdir -p build/classes + mkdir -p build/javadoc + + javac -d "build/classes" -encoding UTF-8 \ + "src/main/java/org/${pkgname}/api/API.java" + + javadoc -d build/javadoc/ \ + -sourcepath src/main/java/ \ + -encoding UTF-8 \ + org.apiguardian.api + + jar -cvf "${pkgname}.jar" -C build/classes . +} + +package() { + cd "${srcdir}/${pkgname}-r${pkgver}" + + # Install license file + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" + + # Install documentation + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r build/javadoc "${pkgdir}/usr/share/doc/${pkgname}" + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install "org.apiguardian.api" "${pkgname}" ${pkgver} \ + pom.xml "${pkgname}.jar" "${pkgname}.jar" + + ln -s "/usr/share/java/${_libname}.jar" \ + "$pkgdir/usr/share/java/${_libname}-$pkgver.jar" +} |