%bcond_without bootstrap # Main version can be seen here http://www.jetbrains.com/idea/download/index.html # while the build numbers corresponds to tags in VCS %define idea_version 9.0.1 %define idea_build 94.399 Name: intellij-idea Version: %{idea_version}.%{idea_build} Release: 12%{?dist} Summary: IntelliJ IDEA Community Edition IDE Group: Development/Tools License: ASL 2.0 and LGPLv2 and CDDL and SPL # trove4j: LGPLv2 # eawtstub: GPLv2 or CDDL # javacvs: SPL URL: http://www.jetbrains.com/idea/nextversion/free_java_ide.html # git clone --bare git://git.jetbrains.org/idea/community.git idea # cd idea; git archive 94.399 --prefix=idea-94.399/ |xz >idea-94.399.tar.xz Source0: idea-%{idea_build}.tar.xz Source1: intellij-idea-idea Source2: intellij-idea.desktop Source3: intellij-idea-cvsIntegration.sh Source4: intellij-idea-git4idea.sh Source5: intellij-idea-Groovy.sh Source6: intellij-idea-svn4idea.sh Source7: intellij-idea-testng.sh Source8: autoconfig-jdk.pl # Used only for bootstrapping Source10: jps.jar Source11: javac2.jar # Build changes Patch1: 0001-Delete-unneeded-import-that-is-not-compatible-with-O.patch Patch2: 0002-Pull-ASM-3.2-from-ObjectWeb.patch Patch3: 0003-Make-the-NotNull-instrumenter-work-with-stock-asm.patch Patch4: 0004-Pull-cglib-2.2.patch Patch5: 0005-Make-it-build-with-cglib-2.2.patch Patch6: 0006-Fix-build-of-svn-plugin-against-newer-svnkit.patch Patch7: 0007-Rename-javac.util.DefaultFileManager-for-OpenJDK-1.6.patch Patch8: 0008-Make-groovy-plugin-build.patch Patch9: 0009-Do-not-install-stuff-from-lib.patch Patch10: 0010-Use-system-wide-installed-gant-ant-and-jps.patch Patch11: 0011-Chop-out-proxy-support-for-CVS-plugin.patch Patch12: 0012-Scriptlet-and-rules-to-replace-bundled-jars.patch Patch13: 0013-Scriptlet-to-disable-certain-modules.patch Patch15: 0015-Adjust-defaults-for-Fedora.patch Patch16: 0016-Override-broken-javac-class.patch Patch17: 0017-Do-not-unnecessarily-delete-compile-output.patch Patch18: intellij-idea-94.399-fix-jna.patch %if %without bootstrap BuildRequires: jps BuildRequires: intellij-idea %endif BuildRequires: ant BuildRequires: ant-jakarta-oro BuildRequires: antlr BuildRequires: ant-nodeps BuildRequires: cglib = 2.2 BuildRequires: classworlds BuildRequires: apache-commons-beanutils BuildRequires: commons-codec BuildRequires: commons-collections BuildRequires: apache-commons-net BuildRequires: eclipse-jdt BuildRequires: gant BuildRequires: ganymed-ssh2 BuildRequires: gradle-open-api BuildRequires: groovy BuildRequires: jakarta-commons-cli BuildRequires: jakarta-commons-lang BuildRequires: jakarta-commons-logging BuildRequires: jakarta-oro BuildRequires: java-1.6.0-openjdk-devel BuildRequires: javahelp2 BuildRequires: jaxen BuildRequires: jazzy BuildRequires: jdom BuildRequires: jgoodies-forms BuildRequires: jgoodies-looks BuildRequires: jna BuildRequires: jna-contrib >= 3.0.9 BuildRequires: junit BuildRequires: junit4 >= 4.6 BuildRequires: log4j BuildRequires: lucene BuildRequires: lucene-core BuildRequires: mercury BuildRequires: microba BuildRequires: nanoxml BuildRequires: objectweb-asm BuildRequires: patricia-trie BuildRequires: picocontainer BuildRequires: plexus-digest BuildRequires: plexus-utils BuildRequires: svnkit BuildRequires: svnkit-javahl BuildRequires: testng BuildRequires: trilead-ssh2 BuildRequires: velocity BuildRequires: xerces-j2 BuildRequires: xmlbeans BuildRequires: xml-commons-resolver BuildRequires: xmlrpc BuildRequires: xstream BuildRequires: ImageMagick BuildRequires: desktop-file-utils BuildRequires: jcip-annotations # Base Requires: ant-apache-oro Requires: ant-nodeps Requires: cglib Requires: commons-codec Requires: commons-collections Requires: apache-commons-net Requires: eclipse-jdt Requires: groovy Requires: jakarta-commons-lang Requires: jakarta-oro Requires: java-1.6.0-openjdk-devel Requires: javahelp2 Requires: jaxen Requires: jdom Requires: jgoodies-forms Requires: jgoodies-looks Requires: jna Requires: jna-contrib Requires: junit Requires: junit4 Requires: log4j Requires: microba Requires: nanoxml Requires: objectweb-asm Requires: picocontainer Requires: velocity Requires: xerces-j2 Requires: xmlbeans Requires: xml-commons-resolver Requires: xmlrpc Requires: xstream Requires: intellij-idea-annotations Requires: xdg-utils # Modules Requires: trilead-ssh2 Requires: gradle-open-api Requires: svnkit Requires: svnkit-javahl Requires: testng %description IntelliJ IDEA Community Edition features an intelligent code editor that has all the smarts for understanding Java code; provides refactorings, code inspections and intentions, super-fast navigation and search. It integrates with such essential tools as JUnit and TestNG, Ant and Maven, and popular version control systems: CVS, Subversion and git. XML-Java interoperability and comprehensive Groovy language support are complemented by the Swing UI designer providing the suite of tools for developing Java desktop applications - such as IntelliJ IDEA itself. %package annotations Summary: IntelliJ IDEA Community Edition IDE Group: Development/Tools URL: http://www.jetbrains.com/idea/features/annotation_java.html BuildArch: noarch %description annotations This package contains IntelliJ IDEA annotation classes as well as compiler extension and Ant tasks to process the annotations. %prep %setup -q -n idea-%{idea_build} # The patched gnu-trove, adds some equality classes, # seems like based on 1.0.2 unzip -qd trove4j lib/src/trove4j_src.jar # This is some code specific to cocoa GUI, originates # from netbeans, though not packaged with it when # not on OS X. Not distributed separately. unzip -qd eawtstub lib/src/eawtstub_src.zip # Patches # At least ones against .idea should not make backups %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %build # Fix up build number sed 's/\(buildNumber: "IC\)-[^"]*/\1-%{idea_build}/' \ -i build/scripts/dist.gant # Build patched trove4j mkdir -p trove4j/out find trove4j/src -name '*.java' |xargs javac -d trove4j/out jar cf trove4j/trove4j.jar -C trove4j/out . # Build standalone eawt stub cd eawtstub ant -Djavac.source=1.5 -Djavac.target=1.5 jar cd .. # We don't build certain modules until we sort out the dependencies sh disablemodules.sh # Replace the prebuilt JARS sh replacedeps.sh <replacerules.txt # Drop bundled gant find build/lib/ -type f -delete # Drop other prebuilt stuff find lib java plugins -name '*.jar' -not -name 'serviceMessages.jar' -delete # Break generator cd native/breakgen gcc -I/usr/lib/jvm/java/include/linux -I/usr/lib/jvm/java/include \ %{optflags} -shared -fPIC -o libbreakgen.so AppMain.c cd ../.. cp -fl native/breakgen/libbreakgen.so bin/linux/libbreakgen.so cp -fl bin/linux/libbreakgen.so bin/linux/libbreakgen64.so # Patch javac :( # https://bugs.openjdk.java.net/show_bug.cgi?id=100135 # https://bugs.openjdk.java.net/show_bug.cgi?id=100136 cd patches find -name '*.java' |xargs javac -classpath /usr/lib/jvm/java/lib/tools.jar cd .. # Fire! %if %with bootstrap CLASSPATH=$(build-classpath jgoodies-forms jdom objectweb-asm/asm-commons):%{SOURCE10}:%{SOURCE11} \ %else CLASSPATH=$(build-classpath jgoodies-forms jdom objectweb-asm/asm-commons idea/javac2 jps) \ %endif gant -f build/scripts/dist.gant %install rm -rf $RPM_BUILD_ROOT # Directory structure install -d $RPM_BUILD_ROOT%{_javadir}/idea install -d $RPM_BUILD_ROOT%{_libdir}/idea/bin install -d $RPM_BUILD_ROOT%{_bindir} install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps install -d $RPM_BUILD_ROOT%{_datadir}/applications # Core install -p -m644 out/dist.all.ce/lib/*.jar trove4j/trove4j.jar \ $RPM_BUILD_ROOT%{_javadir}/idea install -p -m644 out/dist.all.ce/lib/*.jar trove4j/trove4j.jar \ $RPM_BUILD_ROOT%{_javadir}/idea install -p -m644 bin/idea.properties bin/log.xml bin/appletviewer.policy \ $RPM_BUILD_ROOT%{_libdir}/idea/bin install -p -m755 bin/linux/libbreakgen.so \ $RPM_BUILD_ROOT%{_libdir}/idea/bin install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/idea install -p -m755 %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/idea # Plugins cp -a out/dist.all.ce/plugins $RPM_BUILD_ROOT%{_libdir}/idea install -p -m644 %{SOURCE3} \ $RPM_BUILD_ROOT%{_libdir}/idea/plugins/cvsIntegration/cvsIntegration.sh install -p -m644 %{SOURCE4} \ $RPM_BUILD_ROOT%{_libdir}/idea/plugins/git4idea/git4idea.sh install -p -m644 %{SOURCE5} \ $RPM_BUILD_ROOT%{_libdir}/idea/plugins/Groovy/Groovy.sh install -p -m644 %{SOURCE6} \ $RPM_BUILD_ROOT%{_libdir}/idea/plugins/svn4idea/svn4idea.sh install -p -m644 %{SOURCE7} \ $RPM_BUILD_ROOT%{_libdir}/idea/plugins/testng/testng.sh # Menu entry convert out/classes/production/icons/idea_CE.ico idea.png mv idea-0.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}-ce.png desktop-file-install %{SOURCE2} \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/idea %{_libdir}/idea %dir %{_javadir}/idea %{_javadir}/idea/boot.jar %{_javadir}/idea/bootstrap.jar %{_javadir}/idea/extensions.jar %{_javadir}/idea/forms_rt.jar %{_javadir}/idea/icons.jar %{_javadir}/idea/idea.jar %{_javadir}/idea/idea_rt.jar %{_javadir}/idea/openapi.jar %{_javadir}/idea/resources_en.jar %{_javadir}/idea/resources.jar %{_javadir}/idea/trove4j.jar %{_javadir}/idea/util.jar %{_datadir}/pixmaps/%{name}-ce.png %{_datadir}/applications/%{name}.desktop %doc LICENSE.txt %files annotations %{_javadir}/idea/javac2.jar %{_javadir}/idea/annotations.jar %doc LICENSE.txt %changelog * Mon Sep 27 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 9.0.1.94.399-12 - fix jna-examples deps to point to jna-contrib - add dep on svnkit-javahl * Sun Jun 27 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-11 - Fix the commons-net dependency * Thu Apr 08 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-10 - Include ant in the runtime classpath * Mon Apr 05 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-9 - Enable font antialiasing - Disable offscreen rendering for java2d, slow on EXA - Do not comment out uncompilable code, patch javac - Detect installed JVMs on startup - Saner defaults for web browsers configuration * Fri Apr 02 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-8 - Correct path to Eclipse JDT - Set up OpenJDK 1.6.0 SDK per default - Disable updates check * Mon Mar 29 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-2 - Bootstrap * Sun Mar 28 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.399-1 - Update to a later build - Split annotations into a subpackage - Provide a way for plugins to add their dependencies to a classpath - Fix @NotNull processing, re-enable it * Tue Mar 23 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.393-6 - Disable bootstrap * Thu Mar 18 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.393-5 - Re-enable SVN - Fix License tag - Build breakgen with proper compiler flags * Wed Feb 24 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.310-4 - Enable all plugins, except for maven * Tue Feb 23 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.310-3 - Build with external jps - Depend upon ourselves -- make it possible to bootstrap * Wed Feb 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.310-2 - Use objectweb-asm 3.1 instead of asm2, needed for new groovy * Tue Feb 16 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0.1.94.310-1 - Rebase to newest upstream build * Tue Feb 16 2010 Lubomir Rintel <lkundrak@v3.sk> - 9.0-0.2.20091028git - Builds against Fedora * Fri Oct 30 2009 Lubomir Rintel <lkundrak@v3.sk> - 9.0-0.1.20091028git - Packaging start