void-packages/srcpkgs/GoLand/template
2021-07-14 10:12:56 -03:00

69 lines
1.9 KiB
Bash

# Template file for 'GoLand'
pkgname=GoLand
version=2021.1.3
revision=1
archs="i686 x86_64"
depends="jetbrains-jdk-bin"
short_desc="Cross-platform IDE built specially for Go developers"
maintainer="Anton Afanasyev <anton@doubleasoftware.com>"
license="custom:Commercial"
homepage="https://www.jetbrains.com/go"
distfiles="https://download.jetbrains.com/go/goland-${version}.tar.gz"
checksum=ade387550e79a8e4cdd31cfbdef5f344f30d2c4e005144a44e95cdb1419ac977
repository=nonfree
restricted=yes
nopie=yes
python_version=3
post_extract() {
# Remove files for other CPU architectures
rm -rf lib/pty4j-native/linux/aarch64
rm -rf lib/pty4j-native/linux/mips64el
rm -rf lib/pty4j-native/linux/ppc64le
# Remove files for other OSes
rm -rf plugins/cwm-plugin/quiche-native/darwin-aarch64
rm -rf plugins/cwm-plugin/quiche-native/darwin-x86-64
rm -rf plugins/cwm-plugin/quiche-native/win32-x86-64
rm -rf plugins/performanceTesting/bin/yjpagent.dll
rm -rf plugins/performanceTesting/bin/yjpagent64.dll
rm -rf plugins/performanceTesting/bin/libyjpagent.dylib
case "$XBPS_TARGET_MACHINE" in
x86_64)
rm -rf bin/fsnotifier
rm -rf bin/goland.vmoptions
rm -rf lib/pty4j-native/linux/x86
rm -rf plugins/performanceTesting/bin/libyjpagent.so
;;
i686)
rm -rf bin/fsnotifier64
rm -rf bin/goland64.vmoptions
rm -rf lib/pty4j-native/linux/x86_64
rm -rf plugins/performanceTesting/bin/libyjpagent64.so
;;
esac
}
do_install() {
TARGET_PATH="usr/lib/${pkgname}"
vmkdir usr/bin
vmkdir ${TARGET_PATH}
local i
for i in license/* ; do
vlicense $i
done
local launcher_path="bin/goland.sh"
sed -i '1 s/$/\nGOLAND_JDK=${GOLAND_JDK:-${IDEA_JDK}}/' "${launcher_path}"
vcopy bin ${TARGET_PATH}
vcopy help ${TARGET_PATH}
vcopy lib ${TARGET_PATH}
vcopy plugins ${TARGET_PATH}
vcopy product-info.json ${TARGET_PATH}
vcopy build.txt ${TARGET_PATH}
ln -sf "/${TARGET_PATH}/${launcher_path}" "${DESTDIR}/usr/bin/${pkgname}"
}