Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 81ef1104005c4adcf7e6e311eab9bf99 > files > 1

atunes-3.1.2-2.mga5.src.rpm

diff -Nur atunes-3.1.1/aTunes.sh atunes-3.1.1/aTunes.sh-daviddavid
--- atunes-3.1.1/aTunes.sh	2014-04-06 13:00:30.656930138 +0200
+++ atunes-3.1.1/aTunes.sh-daviddavid	2014-04-06 14:10:50.116707855 +0200
@@ -16,9 +16,27 @@
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
- 
+
+# Get architecture
+ARCH=`uname -m | sed -e s/x86_64/64/ -e s/i.86/32/`
+
+# Additionnal JVM arguments
+CLIENTARGS="-Xms128m -Xmx256m"
+
+# Get library directory
+if [ $ARCH -eq 32 ]
+then
+    LIB=lib
+else
+    LIB=lib64
+fi
+
 #Change to dir where aTunes is
-cd `dirname $0`
+SCDIR=/usr/share/atunes
+JAVADIR=/usr/share/java/atunes
+LIBPATH=/usr/$LIB
+LIBRARY=libJXGrabKey.so
+cd $SCDIR
 
 # Parse arguments and add quotes to all
 args=""
@@ -27,4 +45,7 @@
   args="$args \"$arg\""
 done
 
-java -Dsubstancelaf.windowRoundedCorners=false -Dinsubstantial.looseTableCellRenderers=true -Djava.library.path=./ -Xms128m -Xmx256m -splash:splash.gif -cp aTunes.jar:lib/* net.sourceforge.atunes.Main $args
+java \
+	-Dsubstancelaf.windowRoundedCorners=false -Dinsubstantial.looseTableCellRenderers=true \
+	-Djava.library.path=./ $CLIENTARGS -splash:splash.gif -cp aTunes.jar:$JAVADIR/lib/* \
+	net.sourceforge.atunes.Main $args $LIBPATH/$LIBRARY