[packages/clion] use XDG dirs for config and cache

glen glen at pld-linux.org
Mon Jan 26 22:16:31 CET 2015


commit 597c60d9882f3e91e950f1fe5f8350e47b996ee2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Jan 26 22:46:07 2015 +0200

    use XDG dirs for config and cache

 clion.spec |  3 +++
 pld.patch  | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
---
diff --git a/clion.spec b/clion.spec
index fcfdb38..82fe4d8 100644
--- a/clion.spec
+++ b/clion.spec
@@ -13,6 +13,7 @@ Group:		Development/Tools
 Source0:	http://download.jetbrains.com/cpp/clion-%{bid}.tar.gz
 # NoSource0-md5:	af28ecedc672920503013ff457ed38df
 NoSource:	0
+Patch0:		pld.patch
 URL:		http://www.jetbrains.com/clion/
 BuildRequires:	jpackage-utils
 BuildRequires:	rpm-javaprov
@@ -63,6 +64,8 @@ rm -r lib/libpty/{macosx,win}
 chmod a+rx bin/*.so bin/fsnotifier*
 mv bin/%{product}.svg .
 
+%patch0 -p1
+
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
diff --git a/pld.patch b/pld.patch
new file mode 100644
index 0000000..dfa1b2d
--- /dev/null
+++ b/pld.patch
@@ -0,0 +1,42 @@
+--- clion-140.1740.3/bin/clion.sh~	2015-01-19 20:36:22.000000000 +0200
++++ clion-140.1740.3/bin/clion.sh	2015-01-26 21:29:17.604754268 +0200
+@@ -155,6 +155,11 @@
+ COMMON_JVM_ARGS="-XX:ErrorFile=$HOME/java_error_in_CL_%p.log \"-Xbootclasspath/a:$IDE_HOME/lib/boot.jar\" -Didea.paths.selector=clion10 $IDE_PROPERTIES_PROPERTY"
+ IDE_JVM_ARGS="-Didea.platform.prefix=CLion -Didea.no.jre.check=true"
+ 
++CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/clion"
++CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/clion"
++
++IDE_JVM_ARGS="$IDE_JVM_ARGS -Dconfig.dir=$CONFIG_DIR -Dcache.dir=$CACHE_DIR"
++
+ CLASSPATH="$IDE_HOME/lib/bootstrap.jar"
+ CLASSPATH="$CLASSPATH:$IDE_HOME/lib/extensions.jar"
+ CLASSPATH="$CLASSPATH:$IDE_HOME/lib/util.jar"
+--- clion-140.1740.3/bin/idea.properties~	2015-01-19 20:44:48.000000000 +0200
++++ clion-140.1740.3/bin/idea.properties	2015-01-26 21:30:48.402786767 +0200
+@@ -6,21 +6,25 @@
+ # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
+ #---------------------------------------------------------------------
+ # idea.config.path=${user.home}/.clion/config
++idea.config.path=${config.dir}
+ 
+ #---------------------------------------------------------------------
+ # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
+ #---------------------------------------------------------------------
+ # idea.system.path=${user.home}/.clion/system
++idea.system.path=${cache.dir}
+ 
+ #---------------------------------------------------------------------
+ # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
+ #---------------------------------------------------------------------
+ # idea.plugins.path=${idea.config.path}/plugins
++idea.plugins.path=${config.dir}/plugins
+ 
+ #---------------------------------------------------------------------
+ # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
+ #---------------------------------------------------------------------
+ # idea.log.path=${idea.system.path}/log
++idea.log.path=${cache.dir}/log
+ 
+ #---------------------------------------------------------------------
+ # Maximum file size (kilobytes) IDE should provide code assistance for.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/clion.git/commitdiff/d113ef60a937899b5dcefca49ea549a2d8fe43a1



More information about the pld-cvs-commit mailing list