Blame intellij-idea.spec

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