# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Contributor: Daniel Fancsali <fancsali@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=clojure
pkgver=1.12.0
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 bash"
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="
9046df3a13215df07742187ff4056b391e75353a64da12f22fd680d8e02b5e19e71e9a8cad45d80c073108309f3c2b652318e0cf98db3ee3d0211f6ba6d3c832  clojure-1.12.0.tar.gz
763079a57001c5d53c0c3fefc1a556a60c77983ddcece12b8cb6a419df1acba19e4ec194e08b6692b1ec1261abd7aa59d06513d9cff07cc0716e3b9f412f47f4  clojure
"
