From 8087edf5528cb9a7ca7d365b86bba856898f178c Mon Sep 17 00:00:00 2001 From: Eric Evans Date: Tue, 14 Dec 2010 01:46:34 +0000 Subject: [PATCH] enable use of jna in debian packages Patch by eevans and paul cannon for CASSANDRA-1689 git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@1048903 13f79535-47bb-0310-9956-ffa450edef68 --- debian/control | 1 + debian/default | 7 +++++++ debian/init | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 debian/default diff --git a/debian/control b/debian/control index b3aa0ce4db..f4d20eb9d9 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Standards-Version: 3.8.3 Package: cassandra Architecture: all Depends: openjdk-6-jre-headless (>= 6b11) | java6-runtime, jsvc (>= 1.0), libcommons-daemon-java (>= 1.0), adduser +Recommends: libjna-java Description: distributed storage system for structured data Cassandra is a distributed (peer-to-peer) system for the management and storage of structured data. diff --git a/debian/default b/debian/default new file mode 100644 index 0000000000..1b56a980fd --- /dev/null +++ b/debian/default @@ -0,0 +1,7 @@ +# NOTICE: See also /etc/cassandra/cassandra-env.sh + +# EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with +# additional libraries. It is formatted as a colon-delimited list of +# class directories and/or jar files. For example, to enable the +# JMX-to-web bridge install libmx4j-java and uncomment the following. +#EXTRA_CLASSPATH="/usr/share/java/mx4j-tools.jar" diff --git a/debian/init b/debian/init index b0e3cad9a1..1d2961fb51 100644 --- a/debian/init +++ b/debian/init @@ -77,11 +77,14 @@ fi # classpath() { - cp= + cp="$EXTRA_CLASSPATH" for j in /usr/share/$NAME/*.jar; do [ "x$cp" = "x" ] && cp=$j || cp=$cp:$j done + # use JNA if installed in standard location + [ -r /usr/share/java/jna.jar ] && cp="$cp:/usr/share/java/jna.jar" + # Include the conf directory for purposes of log4j-server.properties, and # commons-daemon in support of the daemonization class. printf "$cp:$CONFDIR:/usr/share/java/commons-daemon.jar"