diff --git a/extra/intellij-idea-community-edition/PKGBUILD b/extra/intellij-idea-community-edition/PKGBUILD new file mode 100644 index 0000000000..55be3a9dfa --- /dev/null +++ b/extra/intellij-idea-community-edition/PKGBUILD @@ -0,0 +1,85 @@ +# Maintainer: Lukas Jirkovsky +# Maintainer: Levente Polyak +# Maintainer: Maxime Gauduin +# Maintainer: Orhun Parmaksız + +# ALARM: The one with the braid +# - declare ARM and RISC-V 64-bit compatibility + +pkgname=intellij-idea-community-edition +pkgver=2024.2.2 +_build=242.21829.142 +_jrever=21 +_jdkver=21 +pkgrel=1 +epoch=4 +pkgdesc='IDE for Java, Groovy and other programming languages with advanced refactoring features' +url='https://www.jetbrains.com/idea/' +arch=('x86_64' 'aarch64' 'riscv64') +license=('Apache') +backup=('usr/share/idea/bin/idea64.vmoptions') +depends=('giflib' "java-environment-openjdk=${_jrever}" 'python' 'sh' 'ttf-font' 'libdbusmenu-glib' 'fontconfig' 'hicolor-icon-theme') +makedepends=('ant' 'git' maven) +optdepends=( + 'lldb: lldb frontend integration' +) +source=("git+https://github.com/JetBrains/intellij-community.git#tag=idea/${_build}" + idea-android::"git+https://github.com/JetBrains/android.git#tag=idea/${_build}" + idea.desktop + idea.sh + enable-no-jdr.patch + # The class src/com/intellij/openapi/projectRoots/ex/JavaSdkUtil.java:56 (git commit 0ea5972cdad569407078fb27070c80e2b9235c53) + # assumes the user's maven repo is at {$HOME}/.m2/repository and it contains junit-3.8.1.jar + https://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar) +noextract=('junit-3.8.1.jar') +sha256sums=('fbb7be2d8752e41c953c6f162c417b69c492c9b3a9f754d1a992ec3762daf468' + '2ed9213e6d107161ab201ad1ee0e57792294658c60b6558466c6b1ea48dba3e4' + '049c4326b6b784da0c698cf62262b591b20abb52e0dcf869f869c0c655f3ce93' + '6f2b00d5bcf54639e6a1fa6387dffb9fb035f1dd58ffd31ea1689af74a30b784' + 'b7858737346fb08423ee7fd177f9e59180d2173d988dd8622b84d58426fcb3a7' + 'b58e459509e190bed737f3592bc1950485322846cf10e78ded1d065153012d70') + +prepare() { + cd intellij-community + + # build system doesn't like symlinks + mv "${srcdir}"/idea-android android + + export MAVEN_REPOSITORY=${srcdir}/.m2/repository + mvn install:install-file \ + -Dfile="${srcdir}"/junit-3.8.1.jar \ + -DgroupId=junit \ + -DartifactId=junit \ + -Dversion=3.8.1 \ + -Dpackaging=jar \ + -DgeneratePom=true + + patch -Np1 < "${srcdir}/enable-no-jdr.patch" +} + +build() { + cd intellij-community + + export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk" + export PATH="/usr/lib/jvm/java-${_jdkver}-openjdk/bin:$PATH" + export MAVEN_REPOSITORY=${srcdir}/.m2/repository + + ./installers.cmd -Dintellij.build.use.compiled.classes=false -Dintellij.build.target.os=linux -Dbuild.number="${_build}" + tar -xf out/idea-ce/artifacts/ideaIC-${_build}-no-jbr.tar.gz -C "${srcdir}" +} + +package() { + cd idea-IC-${_build} + + install -dm 755 "${pkgdir}"/usr/share/{licenses,pixmaps,idea,icons/hicolor/scalable/apps} + cp -dr --no-preserve='ownership' bin lib plugins "${pkgdir}"/usr/share/idea/ + cp -dr --no-preserve='ownership' license "${pkgdir}"/usr/share/licenses/idea + ln -s /usr/share/idea/bin/idea.png "${pkgdir}"/usr/share/pixmaps/ + ln -s /usr/share/idea/bin/idea.svg "${pkgdir}"/usr/share/icons/hicolor/scalable/apps/ + install -Dm 644 ../idea.desktop -t "${pkgdir}"/usr/share/applications/ + install -Dm 755 ../idea.sh "${pkgdir}"/usr/bin/idea + install -Dm 644 build.txt -t "${pkgdir}"/usr/share/idea + install -Dm 644 product-info.json -t "${pkgdir}"/usr/share/idea +} + +# vim: ts=2 sw=2 et: diff --git a/extra/intellij-idea-community-edition/enable-no-jdr.patch b/extra/intellij-idea-community-edition/enable-no-jdr.patch new file mode 100644 index 0000000000..df81718756 --- /dev/null +++ b/extra/intellij-idea-community-edition/enable-no-jdr.patch @@ -0,0 +1,12 @@ +diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt +--- a/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt (revision 511c12bcbcd84a79e7f2374fccbd5a065b489629) ++++ b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt (date 1702113502080) +@@ -46,7 +46,7 @@ + /** + * If `true`, a separate *[org.jetbrains.intellij.build.impl.LinuxDistributionBuilder.NO_RUNTIME_SUFFIX].tar.gz artifact without a runtime will be produced. + */ +- var buildArtifactWithoutRuntime = false ++ var buildArtifactWithoutRuntime = true + + /** + * Set both properties if a .snap package should be produced. diff --git a/extra/intellij-idea-community-edition/idea.desktop b/extra/intellij-idea-community-edition/idea.desktop new file mode 100644 index 0000000000..fdb3eb2e32 --- /dev/null +++ b/extra/intellij-idea-community-edition/idea.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=IntelliJ IDEA Community Edition +Comment=Develop with pleasure! +Exec=/usr/bin/idea %f +Icon=idea +Terminal=false +StartupNotify=true +StartupWMClass=jetbrains-idea-ce +Categories=Development;IDE;Java; diff --git a/extra/intellij-idea-community-edition/idea.sh b/extra/intellij-idea-community-edition/idea.sh new file mode 100755 index 0000000000..d44f0ebeaa --- /dev/null +++ b/extra/intellij-idea-community-edition/idea.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ -z "$IDEA_JDK" ] ; then + IDEA_JDK="/usr/lib/jvm/java-21-openjdk/" +fi +# open-jfx location that should match the JDK version +if [ -z "$IDEA_JFX" ] ; then + IDEA_JFX="/usr/lib/jvm/java-21-openjfx/" +fi +# classpath according to defined JDK/JFX +if [ -z "$IDEA_CLASSPATH" ] ; then + IDEA_CLASSPATH="${IDEA_JDK}/lib/*:${IDEA_JFX}/lib/*" +fi + +exec env IDEA_JDK="$IDEA_JDK" IDEA_CLASSPATH="$IDEA_CLASSPATH" /usr/share/idea/bin/idea.sh "$@" + +# vim: ts=2 sw=2 et: