aboutsummaryrefslogtreecommitdiff
path: root/system/apache-cassandra
diff options
context:
space:
mode:
Diffstat (limited to 'system/apache-cassandra')
-rw-r--r--system/apache-cassandra/README4
-rw-r--r--system/apache-cassandra/apache-cassandra.SlackBuild95
-rw-r--r--system/apache-cassandra/apache-cassandra.info10
-rw-r--r--system/apache-cassandra/cassandra.in.sh46
-rw-r--r--system/apache-cassandra/doinst.sh21
-rw-r--r--system/apache-cassandra/rc.cassandra41
-rw-r--r--system/apache-cassandra/slack-desc19
7 files changed, 236 insertions, 0 deletions
diff --git a/system/apache-cassandra/README b/system/apache-cassandra/README
new file mode 100644
index 0000000000000..b243ee862a4e3
--- /dev/null
+++ b/system/apache-cassandra/README
@@ -0,0 +1,4 @@
+The Apache Cassandra Project develops a
+highly scalable second-generation distributed database,
+bringing together Dynamo's fully distributed design and
+Bigtable's ColumnFamily-based data model.
diff --git a/system/apache-cassandra/apache-cassandra.SlackBuild b/system/apache-cassandra/apache-cassandra.SlackBuild
new file mode 100644
index 0000000000000..7b55ce97f85c7
--- /dev/null
+++ b/system/apache-cassandra/apache-cassandra.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# Slackware build script for apache-cassandra-bin
+
+# Copyright 2010 Manlio Modugno <manliomodugno -# #- gmail-# #- com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# based on apache-tomcat.SlackBuild by Heinz Wiesinger and Vincent Batts
+
+PRGNAM=apache-cassandra
+VERSION=0.6.4
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-bin.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p $PKG/opt/$PRGNAM
+mkdir -p $PKG/etc/$PRGNAM
+mkdir -p $PKG/var/log/cassandra
+mkdir -p $PKG/var/lib/cassandra
+rm -f bin/*.bat
+
+cp -f $CWD/cassandra.in.sh $PKG/etc/$PRGNAM
+cp -rf conf/* interface $PKG/etc/$PRGNAM
+cp -rf bin lib $PKG/opt/$PRGNAM
+
+mkdir -p $PKG/etc/{profile.d,rc.d}
+cp $CWD/rc.cassandra $PKG/etc/rc.d/rc.cassandra.new
+
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.csh
+#!/bin/csh
+setenv CASSANDRA_HOME /opt/$PRGNAM
+setenv CASSANDRA_CONF /etc/$PRGNAM
+setenv CASSANDRA_INCLUDE "$CASSANDRA_CONF/cassandra.in.sh"
+EOF
+
+cat << EOF > $PKG/etc/profile.d/$PRGNAM.sh
+#!/bin/sh
+export CASSANDRA_HOME=/opt/$PRGNAM
+export CASSANDRA_CONF=/etc/$PRGNAM
+export CASSANDRA_INCLUDE="$CASSANDRA_CONF/cassandra.in.sh"
+EOF
+
+chmod 0755 $PKG/etc/profile.d/*
+
+# Documentation
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES.txt LICENSE.txt NEWS.txt NOTICE.txt README.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -rf javadoc $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/system/apache-cassandra/apache-cassandra.info b/system/apache-cassandra/apache-cassandra.info
new file mode 100644
index 0000000000000..23d94d30a9f7e
--- /dev/null
+++ b/system/apache-cassandra/apache-cassandra.info
@@ -0,0 +1,10 @@
+PRGNAM="apache-cassandra"
+VERSION="0.6.4"
+HOMEPAGE="http://cassandra.apache.org/"
+DOWNLOAD="http://www.apache.org/dist/cassandra/0.6.4/apache-cassandra-0.6.4-bin.tar.gz"
+MD5SUM="3bb41737ef8f1f76cd5d13cb6db5e079"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Manlio Modugno"
+EMAIL="manliomodugno -# #- gmail-# #- com"
+APPROVED="dsomero"
diff --git a/system/apache-cassandra/cassandra.in.sh b/system/apache-cassandra/cassandra.in.sh
new file mode 100644
index 0000000000000..54be13c33d3b3
--- /dev/null
+++ b/system/apache-cassandra/cassandra.in.sh
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This can be the path to a jar file, or a directory containing the
+# compiled classes. NOTE: This isn't needed by the startup script,
+# it's just used here in constructing the classpath.
+cassandra_bin=$CASSANDRA_HOME/build/classes
+#cassandra_bin=$cassandra_home/build/cassandra.jar
+
+# JAVA_HOME can optionally be set here
+#JAVA_HOME=/usr/local/jdk6
+
+# The java classpath (required)
+CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
+
+for jar in $CASSANDRA_HOME/lib/*.jar; do
+ CLASSPATH=$CLASSPATH:$jar
+done
+
+# Arguments to pass to the JVM
+JVM_OPTS=" \
+ -ea \
+ -Xms256M \
+ -Xmx1G \
+ -XX:+UseParNewGC \
+ -XX:+UseConcMarkSweepGC \
+ -XX:+CMSParallelRemarkEnabled \
+ -XX:SurvivorRatio=8 \
+ -XX:MaxTenuringThreshold=1 \
+ -XX:+HeapDumpOnOutOfMemoryError \
+ -Dcom.sun.management.jmxremote.port=8080 \
+ -Dcom.sun.management.jmxremote.ssl=false \
+ -Dcom.sun.management.jmxremote.authenticate=false"
diff --git a/system/apache-cassandra/doinst.sh b/system/apache-cassandra/doinst.sh
new file mode 100644
index 0000000000000..95008b72548f4
--- /dev/null
+++ b/system/apache-cassandra/doinst.sh
@@ -0,0 +1,21 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.tomcat.new:
+if [ -e etc/rc.d/rc.cassandra ]; then
+ cp -a etc/rc.d/rc.cassandra etc/rc.d/rc.cassandra.new.incoming
+ cat etc/rc.d/rc.cassandra.new > etc/rc.d/rc.cassandra.new.incoming
+ mv etc/rc.d/rc.cassandra.new.incoming etc/rc.d/rc.cassandra.new
+fi
+
+config etc/rc.d/rc.cassandra.new
diff --git a/system/apache-cassandra/rc.cassandra b/system/apache-cassandra/rc.cassandra
new file mode 100644
index 0000000000000..97a8e8f17288b
--- /dev/null
+++ b/system/apache-cassandra/rc.cassandra
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+CASSANDRA_BIN_PATH="/opt/apache-cassandra/bin"
+PID_FILE="/var/run/cassandra.pid"
+
+stop_cassandra(){
+ kill `cat $PID_FILE`
+ rm -f $PID_FILE
+}
+
+if [ ! -d $CASSANDRA_BIN_PATH ]; then
+ echo
+ echo "Cassandra is not installed on this machine!"
+ echo "Please check cassandra installation or set var CASSANDRA_BIN_PATH properly"
+ echo
+ exit 1
+fi
+
+case $1 in
+ start)
+ echo " * Starting Cassandra..."
+ $CASSANDRA_BIN_PATH/cassandra -p $PID_FILE > /dev/null 2>&1
+ ;;
+ stop)
+ echo " * Stopping Cassandra..."
+ stop_cassandra
+ ;;
+ restart)
+ echo " * Rerstarting Cassandra..."
+ stop_cassandra
+ sleep 3
+ $CASSANDRA_BIN_PATH/cassandra -p $PID_FILE > /dev/null 2>&1
+ ;;
+ *)
+ echo " * Please provide correct option between start|stop|restart"
+ ;;
+esac
+
+
diff --git a/system/apache-cassandra/slack-desc b/system/apache-cassandra/slack-desc
new file mode 100644
index 0000000000000..6b2d69a2845e8
--- /dev/null
+++ b/system/apache-cassandra/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also customary
+# to leave one space after the ':'.
+
+ |----handy-ruler-------------------------------------------------------|
+apache-cassandra: apache-cassandra (distributed database)
+apache-cassandra:
+apache-cassandra: The Apache Cassandra Project develops a highly scalable
+apache-cassandra: second-generation distributed database, bringing together
+apache-cassandra: Dynamo's fully distributed design and Bigtable's
+apache-cassandra: ColumnFamily-based data model.
+apache-cassandra:
+apache-cassandra: Homepage: http://cassandra.apache.org/
+apache-cassandra:
+apache-cassandra:
+apache-cassandra: