void-packages/srcpkgs/eclipse/template

51 lines
1.8 KiB
Bash

# Template file for 'eclipse'
pkgname=eclipse
version=4.32.0
revision=1
_release="2024-06"
_jna_version="5.14.0.v20231211-1200" # Found in distfiles at eclipse/plugins/com.sun.jna_<version#>/
archs="x86_64 aarch64"
depends="openjdk21 gtk+3 libwebkit2gtk41 libXtst
hicolor-icon-theme desktop-file-utils"
short_desc="IDE for Java and other languages"
maintainer="mobinmob <mobinmob@disroot.org>"
license="EPL-1.0"
homepage="https://eclipse.org"
make_dirs="/usr/lib/eclipse/dropins 0770 root users"
nopie=yes
nostrip=yes
python_version=3
distfiles="https://mirror.umd.edu/eclipse/technology/epp/downloads/release/${_release}/R/eclipse-java-${_release}-R-linux-gtk-${XBPS_TARGET_MACHINE%-*}.tar.gz"
case ${XBPS_TARGET_MACHINE} in
x86_64)
checksum="7d77e3d0f226c9dda73d491a1af3aeec11807881e44e870a1fde2833f55df8b5"
;;
aarch64)
checksum="d046576e781722ca3c7d2f1bbd20cfc91182aded9d174fbac3295d43a1a11a6a"
;;
esac
# Skip JNA cross-platform binary components during dependency checks
for _jna_arch in freebsd-x86-64 freebsd-x86 linux-aarch64 linux-armel \
linux-arm linux-loongarch64 linux-mips64el linux-ppc64le linux-ppc \
linux-riscv64 linux-s390x linux-x86-64 linux-x86 openbsd-x86-64 \
openbsd-x86 sunos-sparc sunos-sparcv9 sunos-x86-64 sunos-x86; do
skiprdeps+="/usr/lib/eclipse/plugins/com.sun.jna_${_jna_version}/com/sun/jna/${_jna_arch}/libjnidispatch.so "
done
do_install() {
vmkdir usr/lib/eclipse
cp -a ${wrksrc}/* ${DESTDIR}/usr/lib/eclipse
sed -i '6i-vm' ${DESTDIR}/usr/lib/eclipse/eclipse.ini
sed -i '7i/usr/lib/jvm/openjdk11/bin' ${DESTDIR}/usr/lib/eclipse/eclipse.ini
vbin ${FILESDIR}/eclipse.sh eclipse
vinstall ${FILESDIR}/eclipse.desktop 644 usr/share/applications
for _i in 16 32 48 256; do
install -Dm644 plugins/org.eclipse.platform_*/eclipse${_i}.png \
${DESTDIR}/usr/share/icons/hicolor/${_i}x${_i}/apps/eclipse.png
done
}