diff --git a/anda/apps/intellij-community-idea/anda.hcl b/anda/apps/intellij-community-idea/anda.hcl new file mode 100644 index 0000000000..e34b975e5e --- /dev/null +++ b/anda/apps/intellij-community-idea/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "intellij-community-idea.spec" + } +} diff --git a/anda/apps/intellij-community-idea/enable-no-jdr.patch b/anda/apps/intellij-community-idea/enable-no-jdr.patch new file mode 100644 index 0000000000..131a29311b --- /dev/null +++ b/anda/apps/intellij-community-idea/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 7e0cfee10427cc87a372ef23d6bf083cc35fdb5e) ++++ b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt (date 1670176639293) +@@ -24,7 +24,7 @@ + /** + * If {@code true} a separate *-no-jbr.tar.gz artifact without runtime will be produced. + */ +- var buildTarGzWithoutBundledRuntime = false ++ var buildTarGzWithoutBundledRuntime = true + + /** + * If {@code true}, the only *-no-jbr.tar.gz will be produced, no other binaries for Linux will be built. diff --git a/anda/apps/intellij-community-idea/intellij-community-idea.spec b/anda/apps/intellij-community-idea/intellij-community-idea.spec new file mode 100644 index 0000000000..49cf526d33 --- /dev/null +++ b/anda/apps/intellij-community-idea/intellij-community-idea.spec @@ -0,0 +1,90 @@ +Name: intellij-community-idea +Version: 231.9161.38 +Release: 1%?dist +Summary: IDE for Java/Groovy/etc. with advanced refactoring features +License: Apache-2.0 +URL: https://jetbrains.com/idea +Source0: https://github.com/JetBrains/intellij-community/archive/refs/tags/idea/%version.tar.gz +Source1: https://github.com/JetBrains/android/archive/refs/tags/idea/%version.tar.gz +Source2: https://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar +Patch0: enable-no-jdr.patch +Requires: giflib java-17-openjdk python3 bash libdbusmenu fontconfig hicolor-icon-theme +BuildRequires: ant git java-17-openjdk-devel maven + +%description +Intellij IDEA is an IDE for Java, Groovy and other programming languages with +advanced refactoring features. + +%prep +%autosetup -p1 +tar xvf %SOURCE1 + +cat< idea.desktop +[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; +EOF + + +cat< idea.sh +#!/bin/sh +if [ -z "$IDEA_JDK" ] ; then + IDEA_JDK="/usr/lib/jvm/java-17-openjdk/" +fi +# open-jfx location that should match the JDK version +if [ -z "$IDEA_JFX" ] ; then + IDEA_JFX="/usr/lib/jvm/java-17-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" %_datadir/idea/bin/idea.sh "$@" +EOF + + +%build +export MAVEN_REPOSITORY=%_sourcedir/.m2/repository +mvn install:install-file -Dfile=%SOURCE2 -DgroupId=junit -DartifactId=junit -Dversion=3.8.1 -Dpackaging=jar -DgeneratePom=true + +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk +export PATH="/usr/lib/jvm/java-17-openjdk/bin:$PATH" + +./installers.cmd -Dintellij.build.use.compiled.classes=false -Dintellij.build.target.os=linux + +tar xf out/idea-ce/artifacts/ideaIC-%version-no-jbr.tar.gz -C . + + +%install +cd idea-IC-%version +install -dm755 %buildroot%_datadir/{pixmaps,idea,icons/hicolor/scalable/apps} +cp -dr --no-preserve='ownership' bin lib plugins %buildroot%_datadir/idea/ +ln -s %_datadir/idea/bin/idea.png %buildroot%_datadir/pixmaps/ +ln -s %_datadir/idea/bin/idea.svg %buildroot%_datadir/icons/hicolor/scalable/apps/ +install -Dm644 ../idea.desktop -t %buildroot%_datadir/applications/ +install -Dm755 ../idea.sh %buildroot/%_bindir/idea +chmod +x %buildroot/%_bindir/idea +echo %version > build.txt +install -Dm644 build.txt -t %buildroot%_datadir/idea + + +%files +%doc README.md docs/ +%license idea-IC-%version/license +%_datadir/pixmaps/idea.png +%_datadir/icons/hicolor/scalable/apps/idea.svg +%_datadir/applications/idea.desktop +%_bindir/idea +%_datadir/idea/ + +%changelog +%autochangelog diff --git a/anda/apps/intellij-community-idea/update.rhai b/anda/apps/intellij-community-idea/update.rhai new file mode 100644 index 0000000000..14fc65941b --- /dev/null +++ b/anda/apps/intellij-community-idea/update.rhai @@ -0,0 +1,6 @@ +let ver = gh_tag("JetBrains/intellij-community"); +let ver2 = gh_tag("JetBrains/android"); +if ver.starts_with("idea/") && ver == ver2 { + ver.remove("idea/"); + rpm.version(ver); +}