Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newpkg: extra/intellij-idea-community-edition #2065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions extra/intellij-idea-community-edition/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Maintainer: Lukas Jirkovsky <[email protected]>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Maxime Gauduin <[email protected]>
# Maintainer: Orhun Parmaksız <[email protected]>

# ALARM: The one with the braid <[email protected]>
# - 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:
12 changes: 12 additions & 0 deletions extra/intellij-idea-community-edition/enable-no-jdr.patch
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 11 additions & 0 deletions extra/intellij-idea-community-edition/idea.desktop
Original file line number Diff line number Diff line change
@@ -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;
17 changes: 17 additions & 0 deletions extra/intellij-idea-community-edition/idea.sh
Original file line number Diff line number Diff line change
@@ -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: