diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-05-02 23:46:52 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-05-03 00:04:49 +0200 |
commit | 2e5cc1b5b496548fdfeb16f4fc876f778655c5c6 (patch) | |
tree | 83ea9d4b725e3e87bc14327d4696a03ef80b8eb2 /libre/java-assertj/PKGBUILD | |
parent | 71382ee5ed655be55e50bccfbc88f69e4d52df8d (diff) | |
download | abslibre-2e5cc1b5b496548fdfeb16f4fc876f778655c5c6.tar.gz abslibre-2e5cc1b5b496548fdfeb16f4fc876f778655c5c6.tar.bz2 abslibre-2e5cc1b5b496548fdfeb16f4fc876f778655c5c6.zip |
libre: Add java-assertj
This isn't the latest java-assertj but for now we'll use the 3.8.0
version as it has less dependencies.
It also worked fine in Guix so it was less likely to have problematic
dependencies.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/java-assertj/PKGBUILD')
-rw-r--r-- | libre/java-assertj/PKGBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/libre/java-assertj/PKGBUILD b/libre/java-assertj/PKGBUILD new file mode 100644 index 000000000..fbf78b6eb --- /dev/null +++ b/libre/java-assertj/PKGBUILD @@ -0,0 +1,50 @@ +# 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=java-assertj +pkgver=3.8.0 +pkgrel=1 +pkgdesc="assertions java library" +arch=('any') +url='https://assertj.github.io/doc/#assertj-core' +license=('APACHE') +depends=('java-runtime') +makedepends=('cglib' 'jh' 'junit' 'java-hamcrest') +source=("https://github.com/assertj/assertj-core/archive/refs/tags/assertj-core-${pkgver}.tar.gz") +sha512sums=('ca01bb9323f67c663ca80fed08bcdccedfa28a238231ac141f075bfddef9cc09e18a21af3a12a11ede73111f48a73db9e5a7728bba39c16b5b46c935a3f6cd20') + + +prepare() { + cd "${srcdir}/assertj-core-assertj-core-${pkgver}" + mkdir -p build/classes +} + +build(){ + cd "${srcdir}/assertj-core-assertj-core-${pkgver}" + + CLASSPATH="" + CLASSPATH="${CLASSPATH}:/usr/share/java/cglib.jar" + CLASSPATH="$CLASSPATH:/usr/share/java/junit.jar" + CLASSPATH="$CLASSPATH:/usr/share/java/hamcrest-all.jar" + + javac -cp "${CLASSPATH}" -d build/classes \ + $(find "src/main/java" -name \*.java) + + jar -cvf "assertj.jar" -C "build/classes" . +} + +package(){ + cd "${srcdir}/assertj-core-assertj-core-${pkgver}" + + export DESTDIR=${pkgdir} + jh mvn-install "org.assertj" "assertj-core" ${pkgver} \ + "${srcdir}/assertj-core-${pkgver}.pom" \ + "assertj.jar" \ + "assertj.jar" + + ln -s "/usr/share/java/assertj.jar" \ + "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar" + +} |