From f4a24d7103dc404c1d21ed0a9e48d3ee253d526e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Thu, 4 Apr 2024 17:08:06 +0200 Subject: [PATCH] feat: intellij idea ultimate edition --- .../intellij-idea-ultimate-edition/template | 88 +++++++++++++++++++ srcpkgs/intellij-idea-ultimate-edition/update | 2 + 2 files changed, 90 insertions(+) create mode 100644 srcpkgs/intellij-idea-ultimate-edition/template create mode 100644 srcpkgs/intellij-idea-ultimate-edition/update diff --git a/srcpkgs/intellij-idea-ultimate-edition/template b/srcpkgs/intellij-idea-ultimate-edition/template new file mode 100644 index 0000000..317f924 --- /dev/null +++ b/srcpkgs/intellij-idea-ultimate-edition/template @@ -0,0 +1,88 @@ +# Template file for 'intellij-idea-ultimate-edition' +# Official template from https://github.com/void-linux/void-packages/blob/master/srcpkgs/intellij-idea-ultimate-edition +pkgname=intellij-idea-ultimate-edition +version=2021.3.3 +revision=2 +archs="i686 x86_64" +depends="giflib libXtst jetbrains-jdk-bin lldb-devel" +short_desc="Most intelligent Java IDE" +maintainer="Anton Afanasyev " +license="custom:Commercial" +homepage="https://www.jetbrains.com/idea" +_filename="ideaIU-${version}-no-jbr.tar.gz" +distfiles="https://download.jetbrains.com/idea/${_filename}" +checksum=2a3295fca08060ad515f6c7198879d09963724cfb36af3ea94f16dcd76636470 +nopie=yes +python_version=3 +# requires liblldb.so which is unversioned, pulled by lldb-devel +skiprdeps="/usr/lib/intellij-idea-ultimate-edition/plugins/Kotlin/bin/linux/LLDBFrontend" + +do_extract() { + bsdtar xf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_filename} --strip-components=1 -C . +} + +post_extract() { + # 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/maven/lib/maven3/lib/jansi-native/freebsd64 + rm -rf plugins/maven/lib/maven3/lib/jansi-native/freebsd32 + rm -rf plugins/maven/lib/maven3/lib/jansi-native/osx + rm -rf plugins/maven/lib/maven3/lib/jansi-native/windows32 + rm -rf plugins/maven/lib/maven3/lib/jansi-native/windows64 + rm -rf plugins/performanceTesting/bin/libyjpagent.dylib + rm -rf plugins/performanceTesting/bin/yjpagent.dll + rm -rf plugins/performanceTesting/bin/yjpagent64.dll + rm -rf plugins/webp/lib/libwebp/mac + rm -rf plugins/webp/lib/libwebp/win + + # Remove files for other CPU architectures + rm -rf bin/fsnotifier-arm + rm -rf lib/pty4j-native/linux/aarch64 + rm -rf lib/pty4j-native/linux/arm + rm -rf lib/pty4j-native/linux/mips64el + rm -rf lib/pty4j-native/linux/ppc64le + + case "$XBPS_TARGET_MACHINE" in + x86_64) + rm -rf bin/idea.vmoptions + rm -rf lib/pty4j-native/linux/x86 + rm -rf plugins/android/lib/libwebp/linux/libwebp_jni.so + rm -rf plugins/maven/lib/maven3/lib/jansi-native/linux32 + rm -rf plugins/performanceTesting/bin/libyjpagent.so + rm -rf plugins/webp/lib/libwebp/linux/libwebp_jni.so + ;; + i686) + rm -rf bin/idea64.vmoptions + rm -rf bin/libyjpagent-linux64.so + rm -rf lib/pty4j-native/linux/x86_64 + rm -rf plugins/android/lib/libwebp/linux/libwebp_jni64.so + rm -rf plugins/maven/lib/maven3/lib/jansi-native/linux64 + rm -rf plugins/performanceTesting/bin/libyjpagent64.so + rm -rf plugins/webp/lib/libwebp/linux/libwebp_jni64.so + ;; + esac +} + +do_install() { + TARGET_PATH="usr/lib/${pkgname}" + LICENSE_PATH="usr/share/licenses/${pkgname}" + + vmkdir usr/bin + vmkdir ${TARGET_PATH} + vmkdir ${LICENSE_PATH} + + # Ideally vlicense should be called here, but vcopy is more terse. + vcopy license/* ${LICENSE_PATH} + + vcopy bin ${TARGET_PATH} + vcopy help ${TARGET_PATH} + vcopy lib ${TARGET_PATH} + vcopy plugins ${TARGET_PATH} + vcopy redist ${TARGET_PATH} + vcopy product-info.json ${TARGET_PATH} + vcopy build.txt ${TARGET_PATH} + + ln -sf /${TARGET_PATH}/bin/idea.sh ${DESTDIR}/usr/bin/idea-ultimate +} \ No newline at end of file diff --git a/srcpkgs/intellij-idea-ultimate-edition/update b/srcpkgs/intellij-idea-ultimate-edition/update new file mode 100644 index 0000000..18af9ed --- /dev/null +++ b/srcpkgs/intellij-idea-ultimate-edition/update @@ -0,0 +1,2 @@ +pattern="ideaIU-\K[\d.]+(?=-no-jbr\.tar)" +site="https://data.services.jetbrains.com/products/releases?code=IIU%2CIIC&latest=true&type=release" \ No newline at end of file