[packages/intellij-idea] add jdk table support

glen glen at pld-linux.org
Mon Sep 30 10:16:05 CEST 2013


commit 484937d5587f31e7ad2a3adf96210ca97ecd4ca0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon May 27 11:35:20 2013 +0300

    add jdk table support

 intellij-idea.spec |  8 +++++++-
 jdk.table.patch    | 16 ++++++++++++++++
 jdk.table.xml      | 40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/intellij-idea.spec b/intellij-idea.spec
index e494630..26c8f8d 100644
--- a/intellij-idea.spec
+++ b/intellij-idea.spec
@@ -2,12 +2,14 @@
 Summary:	IntelliJ IDEA 12 - The Most Intelligent Java IDE
 Name:		intellij-idea
 Version:	12.1.2
-Release:	0.1
+Release:	0.2
 License:	Apache v2.0
 Group:		Development/Tools
 Source0:	http://download.jetbrains.com/idea/ideaIC-%{version}-src.tar.bz2
 # Source0-md5:	68cf6340a3ce985cab659944e3ddf926
 Source1:	%{name}.desktop
+Source2:	jdk.table.xml
+Patch0:		jdk.table.patch
 URL:		http://www.jetbrains.org/
 BuildRequires:	ant
 BuildRequires:	desktop-file-utils
@@ -37,6 +39,8 @@ always ready to help you shape your code.
 
 %prep
 %setup -qn ideaIC-129.354
+%undos bin/scripts/unix/idea.sh
+%patch0 -p1
 
 %build
 %ant
@@ -69,6 +73,7 @@ cp -p dist.unix.ce/bin/idea.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 cp -a$l dist.unix.ce/bin $RPM_BUILD_ROOT%{_appdir}
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+%{__sed} -e 's, at jvmdir@,%{_jvmdir},g' %{SOURCE2} > $RPM_BUILD_ROOT%{_appdir}/jdk.table.xml
 ln -s %{_appdir}/bin/idea.sh $RPM_BUILD_ROOT%{_bindir}/idea
 
 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
@@ -87,6 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_appdir}/lib
 %{_appdir}/license
 %{_appdir}/plugins
+%{_appdir}/jdk.table.xml
 %dir %{_appdir}/bin
 %{_appdir}/bin/idea*.vmoptions
 %{_appdir}/bin/appletviewer.policy
diff --git a/jdk.table.patch b/jdk.table.patch
new file mode 100644
index 0000000..763bdc7
--- /dev/null
+++ b/jdk.table.patch
@@ -0,0 +1,16 @@
+--- ideaIC-129.354/bin/scripts/unix/idea.sh~	2013-04-24 17:11:10.000000000 +0300
++++ ideaIC-129.354/bin/scripts/unix/idea.sh	2013-05-27 11:41:39.322453107 +0300
+@@ -176,6 +176,13 @@
+ LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH"
+ export LD_LIBRARY_PATH
+ 
++# Setup jdk table
++IDEA_CONFIG_HOME=$HOME/.IdeaIC11
++jdk_table=$IDEA_CONFIG_HOME/config/options/jdk.table.xml
++if [ ! -e $jdk_table ]; then
++	cp -p $IDE_HOME/jdk.table.xml $jdk_table
++fi
++
+ # ---------------------------------------------------------------------
+ # Run the IDE.
+ # ---------------------------------------------------------------------
diff --git a/jdk.table.xml b/jdk.table.xml
new file mode 100644
index 0000000..24acfcb
--- /dev/null
+++ b/jdk.table.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+  <component name="ProjectJdkTable">
+    <jdk version="2">
+      <name value="1.6" />
+      <type value="JavaSDK" />
+      <version value="java version "1.6.0_35"" />
+      <homePath value="@jvmdir@/java-sun" />
+      <roots>
+        <annotationsPath>
+          <root type="composite" />
+        </annotationsPath>
+        <classPath>
+          <root type="composite">
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/deploy.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/charsets.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/management-agent.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/plugin.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/resources.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/rt.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/jce.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/javaws.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/jsse.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/ext/sunpkcs11.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/ext/dnsns.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/ext/sunjce_provider.jar!/" />
+            <root type="simple" url="jar://@jvmdir@/java-sun/jre/lib/ext/localedata.jar!/" />
+          </root>
+        </classPath>
+        <javadocPath>
+          <root type="composite" />
+        </javadocPath>
+        <sourcePath>
+          <root type="composite" />
+        </sourcePath>
+      </roots>
+      <additional />
+    </jdk>
+  </component>
+</application>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/intellij-idea.git/commitdiff/484937d5587f31e7ad2a3adf96210ca97ecd4ca0



More information about the pld-cvs-commit mailing list