void-packages/srcpkgs/intellij-idea-community-edi.../template

50 lines
1.9 KiB
Bash

# Template file for 'intellij-idea-community-edition'
pkgname=intellij-idea-community-edition
version=2019.1.3
revision=1
archs="i686 x86_64"
depends="virtual?java-environment giflib libXtst"
short_desc="Java integrated development environment by JetBrains"
maintainer="John <johnz@posteo.net>"
license="Apache-2.0"
homepage="https://www.jetbrains.org/"
distfiles="https://download.jetbrains.com/idea/ideaIC-${version}-no-jbr.tar.gz"
checksum=6fbb1f99b467a7c7a39d74b835414288b113a9a136f9ba22b25ea44f87952fff
repository=nonfree
nopie=yes
post_extract() {
mv $XBPS_BUILDDIR/idea-IC-* ${wrksrc}
}
do_install() {
vmkdir usr/bin
vmkdir usr/share/doc/intellij-idea
vmkdir usr/lib/intellij-idea
mv bin lib plugins redist product-info.json build.txt ${DESTDIR}/usr/lib/intellij-idea
mv LICENSE.txt NOTICE.txt license ${DESTDIR}/usr/share/doc/intellij-idea
rm ${DESTDIR}/usr/lib/intellij-idea/bin/fsnotifier-arm
rm ${DESTDIR}/usr/lib/intellij-idea/plugins/android/lib/libwebp/win -rf
rm ${DESTDIR}/usr/lib/intellij-idea/plugins/android/lib/libwebp/mac -rf
case $XBPS_TARGET_MACHINE in
x86_64)
rm ${DESTDIR}/usr/lib/intellij-idea/bin/fsnotifier
rm ${DESTDIR}/usr/lib/intellij-idea/bin/idea.vmoptions
rm ${DESTDIR}/usr/lib/intellij-idea/plugins/android/lib/libwebp/linux/libwebp_jni.so
rm ${DESTDIR}/usr/lib/intellij-idea/lib/pty4j-native/linux/x86 -rf
rm ${DESTDIR}/usr/lib/intellij-idea/lib/pty4j-native/linux/ppc64le -rf
;;
i686)
rm ${DESTDIR}/usr/lib/intellij-idea/bin/fsnotifier64
rm ${DESTDIR}/usr/lib/intellij-idea/bin/idea64.vmoptions
rm ${DESTDIR}/usr/lib/intellij-idea/plugins/android/lib/libwebp/linux/libwebp_jni64.so
rm ${DESTDIR}/usr/lib/intellij-idea/bin/libdbm64.so
rm ${DESTDIR}/usr/lib/intellij-idea/lib/pty4j-native/linux/x86_64 -rf
rm ${DESTDIR}/usr/lib/intellij-idea/lib/pty4j-native/linux/ppc64le -rf
;;
esac
ln -sf /usr/lib/intellij-idea/bin/idea.sh ${DESTDIR}/usr/bin/idea
}