File: install-jars-to-share-java.patch

package info (click to toggle)
sisc 1.16.6-1.2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 8,492 kB
  • sloc: lisp: 69,834; xml: 19,482; java: 17,841; sh: 125; makefile: 54
file content (61 lines) | stat: -rw-r--r-- 2,087 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Description: Install jars to /usr/share/java as per Java policy
 Hack redefines /usr/share/java as SISC_HOME.
From: David Banks <amoebae@gmail.com>
--- a/sisc.sh
+++ b/sisc.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 RLWRAP_FILE=~/.sisc-rlwrap
+HEAP_LOCATION=/usr/share/sisc/sisc.shp
 
 checkIfNonInteractive() {
 # returns true if parameter for "non-interactive" was passed to the script
@@ -21,7 +22,10 @@
    SISC_HOME="`dirname $0`"
    if [ ! -f "$SISC_HOME/sisc.jar" ]
    then 
-     if [ -f /usr/lib/sisc/sisc.jar ] 
+     if [ -f /usr/share/java/sisc.jar ]
+     then
+       SISC_HOME="/usr/share/java"
+     elif [ -f /usr/lib/sisc/sisc.jar ] 
      then 
        SISC_HOME="/usr/lib/sisc" 
      elif [ -f /usr/local/lib/sisc/sisc.jar ]
@@ -70,6 +74,6 @@
         D=";" ;;
     esac
       
-    $JAVA $JAVAOPT -classpath $SISC_HOME/sisc-opt.jar${D}$SISC_HOME/sisc.jar${D}$SISC_HOME/sisc-lib.jar${D}$CLASSPATH -Dsisc.home=$SISC_HOME sisc.REPL -h $SISC_HOME/sisc.shp $PROPERTIES $EXTENSIONS "$@"
+    $JAVA $JAVAOPT -classpath $SISC_HOME/sisc-opt.jar${D}$SISC_HOME/sisc.jar${D}$SISC_HOME/sisc-lib.jar${D}$CLASSPATH -Dsisc.home=$SISC_HOME sisc.REPL -h "$HEAP_LOCATION" $PROPERTIES $EXTENSIONS "$@"
 fi
 
--- a/build.xml
+++ b/build.xml
@@ -65,9 +65,6 @@
   </target>
 
   <target name="prepare-install" depends="prepare">
-    <condition property="instlibdir" value="${prefix}/lib/sisc">
-      <not><isset property="instlibdir"/></not>
-    </condition>
     <condition property="instsharedir" value="${prefix}/share/sisc">
       <not><isset property="instsharedir"/></not>
     </condition>
@@ -665,14 +662,12 @@
 
   <!-- Installation target -->
   <target name="debian-install" depends="prepare-install">
-    <mkdir dir="${instlibdir}"/>
     <mkdir dir="${instsharedir}"/>
     <mkdir dir="${instdocdir}"/>
     <mkdir dir="${instmandir}"/>
     <mkdir dir="${instmandir}/man1"/>
-    <copy todir="${instlibdir}">
+    <copy todir="${instsharedir}">
       <fileset dir="${basedir}">
-        <include name="*.jar"/>
         <include name="*.shp"/>
       </fileset>
     </copy>