Willow Barraco e1cd3a1d10 community/java-common: fix missing symlink when the jvm is empty
In case a jvm is uninstalled, its folder keep some empty folders. This
can trick the trigger script to link it as "default-jvm", and produce
no /usr/bin/java symlink at the end.

Checking that the bin/java file is there seems enough to be sure the jvm
folder is sane enough.
2025-08-25 19:14:19 +02:00

19 lines
538 B
Plaintext

# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=java-common
pkgver=1.0
pkgrel=1
pkgdesc="Java common (updates java links)"
url="https://git.alpinelinux.org/aports/"
arch="noarch"
options="!check" # Symlinks only.
license="GPL-2.0-or-later"
triggers="java-common.trigger=/usr/lib/jvm"
package() {
mkdir -p "$pkgdir"/usr/bin
# create the java symlink, which should always be present
# this is needed for the trigger to work
ln -sf ../lib/jvm/default-jvm/bin/java "$pkgdir"/usr/bin
}