summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-06-22 22:31:09 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-06-23 00:28:58 +0200
commit297394cbb28c6301d728e5ef79a1fa2a146c62dd (patch)
tree9318ef9bb110bb738c40475f110e8fdda05c119f
parent7d5c0d00dcf44fc1c3f66b81d4174d4b3572fc36 (diff)
libre: junit: update to 5.8.2wip-remove-log4j-1.2
TODO: common.io -> junit Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--libre/junit/PKGBUILD111
1 files changed, 84 insertions, 27 deletions
diff --git a/libre/junit/PKGBUILD b/libre/junit/PKGBUILD
index 5a112b979..24ff83bfb 100644
--- a/libre/junit/PKGBUILD
+++ b/libre/junit/PKGBUILD
@@ -3,48 +3,105 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=junit
-pkgver=4.12
-pkgrel=2.parabola1
+_pkgname=junit5
+pkgver=5.8.2
+pkgrel=1.parabola1
pkgdesc='Simple JVM framework to write repeatable tests'
arch=('any')
url='http://www.junit.org/'
-license=('EPL')
+license=('Apache' 'EPL')
depends=('java-runtime' 'java-hamcrest')
-makedepends=('apache-ant' 'jh')
-source=("https://github.com/junit-team/${pkgname}/archive/r${pkgver}.tar.gz"
- "build.xml")
-sha512sums=('ba612598fa6c328e8f4bbea3afda08b459a110837ca3805a62e811535f7bca8d04509f8fe51a413c7bc855fccee35d6946c9eece4dd01726d12454c002a4de32'
- '0ddf2f8ad2b42b427198227be323335eef16a8f189bbff8c8b0a6dc28fea2b6c47c847667f3c745ee696c79f5690424b74be8b0de42e9f89f4b93e403cb679a1')
+makedepends=('apache-ant' 'apiguardian' 'jh')
+source=("https://github.com/junit-team/${_pkgname}/archive/r${pkgver}.tar.gz")
+sha512sums=('d4e7bf23aa736ab17badef59f690cb0040e438d31368c4727b1209c774a30e0cdfea7f206901eb5af3714c019893ac4768d16e8207219662d885c19a66955f7e')
+
+_artifacts=(junit-platform-commons)
+ # junit-jupiter-api
+ # junit-jupiter-engine
+ # junit-jupiter-migrationsupport
+ # junit-jupiter-params
+ # junit-platform-console
+ # junit-platform-engine
+ # junit-platform-jfr
+ # junit-platform-launcher
+ # junit-platform-reporting
+ # junit-platform-runner
+ # junit-platform-suite-api
+ # junit-platform-suite-commons
+ # junit-platform-suite-engine
+ # junit-platform-testkit
+ # junit-vintage-engine
+
+_artifact_package_name() {
+ artifact="$1"
+ # remove "^junit-"
+ artifact="$(echo ${artifact} | sed 's#^junit-##')"
+ left="$(echo ${artifact} | sed 's#-.*##')"
+ right="$(echo ${artifact} | sed 's#.*-##')"
+ echo "org.${pkgname}.${left}.${right}"
+}
prepare() {
- cd "${srcdir}/${pkgname}4-r${pkgver}"
- rm -rv lib/*.jar
- mv ../build.xml .
- ln -sf /usr/share/java/hamcrest-core.jar lib/hamcrest-core-1.3.jar
+ cd "${srcdir}/${_pkgname}-r${pkgver}"
+
+ mkdir -p "${srcdir}/dist"
+ for artifact in ${_artifacts[@]}; do
+ mkdir -p "build/${artifact}/classes"
+ mkdir -p "source/${artifact}/"
+ done
}
build() {
- cd "${srcdir}/${pkgname}4-r${pkgver}"
+ cd "${srcdir}/${_pkgname}-r${pkgver}"
- ant dist
+ CLASSPATH="/usr/share/java/apiguardian.jar:../dist"
+ for artifact in ${_artifacts[@]}; do
+ javac \
+ -classpath "${CLASSPATH}" \
+ -d "build/${artifact}/classes" \
+ -encoding UTF-8 \
+ $(find "${artifact}/src/main/java" -name \*.java)
+
+ jar -cvf \
+ "${srcdir}/dist/${pkgname}.${artifact}.jar" \
+ -C "build/${artifact}/classes" .
+
+ javadoc \
+ -classpath "${CLASSPATH}" \
+ -d "build/javadoc" \
+ -encoding UTF-8 \
+ -sourcepath "${artifact}/src/main/java" \
+ "$(_artifact_package_name ${artifact})"
+ done
}
package() {
- cd "${srcdir}/${pkgname}4-r${pkgver}"
+ cd "${srcdir}/${_pkgname}-r${pkgver}"
+
+ # Install license files
+ install -Dm644 \
+ LICENSE.md \
+ LICENSE-notice.md \
+ -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+ install -Dm644 \
+ junit-jupiter-params/LICENSE-univocity-parsers.md \
+ -t "${pkgdir}/usr/share/licenses/${pkgname}/junit-jupiter-params/"
- # Install license file
- install -Dm644 LICENSE-junit.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+ install -Dm644 \
+ junit-platform-console/LICENSE-picocli.md \
+ -t "${pkgdir}/usr/share/licenses/${pkgname}/junit-platform-console/"
- # Install documentation
- install -d "${pkgdir}/usr/share/doc/${pkgname}"
- cp -r "${pkgname}${pkgver}/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
+ # Install documentation
+ # install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ # cp -r "${pkgname}${pkgver}/javadoc" "${pkgdir}/usr/share/doc/${pkgname}"
- export DESTDIR="$pkgdir"
- jh mvn-install ${pkgname} ${pkgname} ${pkgver} \
- pom.xml \
- "${pkgname}${pkgver}/${pkgname}-${pkgver}.jar" \
- "${pkgname}.jar"
+ export DESTDIR="$pkgdir"
+ jh mvn-install ${pkgname} ${pkgname} ${pkgver} \
+ pom.xml \
+ "${pkgname}${pkgver}/${pkgname}-${pkgver}.jar" \
+ "${pkgname}.jar"
- ln -s "/usr/share/java/${pkgname}.jar" \
- "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
+ ln -s "/usr/share/java/${pkgname}.jar" \
+ "${pkgdir}/usr/share/java/${pkgname}-${pkgver}.jar"
}