# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Contributor: Daniel Fancsali <fancsali@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=clojure
pkgver=1.11.4
pkgrel=0
pkgdesc="The Clojure Programming Language"
url="https://clojure.org"
arch="all !riscv64" # Matching openjdk8 (being the latest LTS for 32bit architectures)
license="EPL-1.0"
makedepends="maven"
source="https://github.com/clojure/clojure/archive/clojure-$pkgver.tar.gz
	clojure"
depends="java-jdk"
builddir="$srcdir/clojure-clojure-$pkgver"
options="!check" #Check occurs in build

# secfixes:
#   1.11.2-r0:
#     - CVE-2024-22871

build() {
	mvn -Plocal package
}

package() {
	install -Dm644 "$builddir/clojure.jar" \
		"$pkgdir/usr/share/clojure/clojure.jar"

	install -Dm755 "$srcdir/clojure" \
		"$pkgdir/usr/bin/clojure"
}

sha512sums="
28eb09eeb5e9d77922a1222478d75bccbeb6b598fac7ba469f561bbbf15fe57ca093fbe5d7ff05d3d78e6260a650b545ffe90413dbba48d869dbb43f73394af2  clojure-1.11.4.tar.gz
763079a57001c5d53c0c3fefc1a556a60c77983ddcece12b8cb6a419df1acba19e4ec194e08b6692b1ec1261abd7aa59d06513d9cff07cc0716e3b9f412f47f4  clojure
"
