# Maintainer: huakim-tyk pkgname=eclipse-platform pkgver=4.29 _pkgbuild='I20230622-1800' pkgrel=6 pkgdesc="A minimal installation suitable for complete per-user customization with the built-in Eclipse package manager" url="https://www.eclipse.org" arch=("amd64" "arm64" "ppc64el") license=("EPL") depends=("java11-runtime" "p!acl") makedepends=('coreutils' 'findutils') optdepends=() conflicts=("eclipse-common") provides=("eclipse=$pkgver") options=(!strip) declare -A arches=([amd64]=x86_64 [arm64]=aarch64 [ppc64el]=ppc64le) for i in "${!arches[@]}"; do eval "sha256sums_${i}=( 'SKIP' '3f35d846f21ff8e7557981a9f9fe65d7a7e5f7d8b4885a32378a2d1e88e7ceaf' 'c30c3da180ab236b7d066c29edc02722cc8bf1cefb7ec180bd8a64d52078e796' '12b1cf1072bb734fc2d9fcbef8c8c05f2873bf4181a8d56dcb44f68371bb41cc' '30073c6a19db2edb4723fc27a5f498dca19954a34e90c5f13700a47479c38916' )" arch="${arches[${i}]}" eval "source_$i=( 'eclipse.tar.gz::https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/${_pkgbuild}/eclipse-platform-${_pkgbuild}-linux-gtk-${arch}.tar.gz' 'eclipse.sh' 'eclipse.desktop' 'postinst' 'prerm' )" done postinst='postinst' prerm='prerm' noextract=(eclipse.tar.gz) prepare(){ cd "${srcdir}" } package() { cd "${srcdir}" tar -zxf --no-same-owner --no-same-permissions eclipse.tar.gz install -d "${pkgdir}/usr/share/applications/" "${pkgdir}/usr/bin/" install -m 755 "${srcdir}/eclipse.sh" "${pkgdir}/usr/bin/eclipse" install -m 644 "${srcdir}/eclipse.desktop" "${pkgdir}/usr/share/applications/" for _i in 16 32 48 256; do install -Dm644 "${srcdir}"/eclipse/plugins/org.eclipse.platform_*/eclipse${_i}.png "$pkgdir/usr/share/icons/hicolor/${_i}x${_i}/apps/eclipse.png" done mv "${srcdir}/eclipse" "${pkgdir}/usr/share/eclipse" cd "${pkgdir}/usr/share/" shopt -s globstar shopt -s dotglob for i in ./**; do # chgrp "${group}" "$i"; # chown "${user}" "$i"; # echo "$i"; if [ -d "$i" ]; then chmod 775 "$i"; chmod 'g+s' "$i"; # setfacl -d -m g:"${group}":rw,u:"${user}":rw "$i"; else chmod g=u "$i"; fi; done # chmod 775 "eclipse/eclipse" }