summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/seafile-server/README30
-rw-r--r--network/seafile-server/patch-seafile-controller-pid-path.diff.gzbin0 -> 372 bytes
-rw-r--r--network/seafile-server/seafile62
-rw-r--r--network/seafile-server/seafile-server.SlackBuild128
-rw-r--r--network/seafile-server/seafile-server.info10
-rw-r--r--network/seafile-server/slack-desc19
6 files changed, 249 insertions, 0 deletions
diff --git a/network/seafile-server/README b/network/seafile-server/README
new file mode 100644
index 0000000000..1df468f030
--- /dev/null
+++ b/network/seafile-server/README
@@ -0,0 +1,30 @@
+Seafile is a next-generation open source cloud storage system with
+advanced support for file syncing, privacy protection and teamwork.
+
+Collections of files are called libraries, and each library can be
+synced separately. A library can be encrypted with a user chosen
+password. This password is not stored on the server, so even the
+server admin cannot view a file's contents.
+
+Seafile allows users to create groups with file syncing, wiki, and
+discussion to enable easy collaboration around documents within a
+team.
+
+Note:
+This package conflicts with seafile-server. Install just one of
+them at the same time. If you want seafile-gui for some reasons
+with seafile-server, you don't need seafile-client.
+
+This package does not update/upgrade Seafile internal stuff.
+See /opt/haiwen/seafile-server/scripts/upgrade and refer to the
+Seafile manual:
+
+ http://manual.seafile.com/deploy/upgrade.html
+
+Stop your instance before upgrading this package and don't use
+the shell scripts from the documentation, but use `seafile` from
+/usr/sbin to start/stop Seafile.
+
+This package is build for personal use, not business/enterprise
+cases. Configuring for FCGI, MySQL, Cluster etc. you're on your
+own, but any suggestions are welcome.
diff --git a/network/seafile-server/patch-seafile-controller-pid-path.diff.gz b/network/seafile-server/patch-seafile-controller-pid-path.diff.gz
new file mode 100644
index 0000000000..fd5e2ff65d
--- /dev/null
+++ b/network/seafile-server/patch-seafile-controller-pid-path.diff.gz
Binary files differ
diff --git a/network/seafile-server/seafile b/network/seafile-server/seafile
new file mode 100644
index 0000000000..0454531932
--- /dev/null
+++ b/network/seafile-server/seafile
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# Simple `seafile-admin` wrapper script.
+
+# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "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 COPYRIGHT
+# OWNER OR CONTRIBUTORS 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.
+
+WORKING_DIR=${WORKING_DIR:-/opt/haiwen}
+PYTHONPATH=$WORKING_DIR/seafile-server/seahub/thirdpart:$PYTHONPATH
+PATH=$PYTHONPATH:$PATH
+SEAFILEUSER=seafile
+
+set -e
+
+execute () {
+ su -s /bin/sh -l $SEAFILEUSER -c "export PYTHONPATH=$PYTHONPATH PATH=$PATH && cd $WORKING_DIR && seafile-admin $1"
+}
+
+case "$1" in
+ start)
+ execute start
+ ;;
+ stop)
+ execute stop
+ ;;
+ setup)
+ execute setup
+ ;;
+ restart)
+ execute stop && execute start
+ ;;
+ reset-admin)
+ execute reset-admin
+ ;;
+ create-admin)
+ execute create-admin
+ ;;
+ *)
+ cat << EOF
+Usage: seafile start|stop|restart|setup|create-admin|reset-admin
+EOF
+ ;;
+esac
diff --git a/network/seafile-server/seafile-server.SlackBuild b/network/seafile-server/seafile-server.SlackBuild
new file mode 100644
index 0000000000..ad1151e512
--- /dev/null
+++ b/network/seafile-server/seafile-server.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Slackware build script for "seafile-server".
+
+# Copyright 2015 Marcel Saegebarth <marc@mos6581.de>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "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 COPYRIGHT
+# OWNER OR CONTRIBUTORS 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.
+
+PRGNAM=seafile-server
+SRCNAM=seafile
+VERSION=${VERSION:-4.0.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if [ $(grep -c ^seafile: /etc/group) -eq 0 ] || \
+ [ $(grep -c ^seafile: /etc/passwd) -eq 0 ]; then
+ cat << EOF
+
+ You must have a seafile user and group to run this script
+
+ # groupadd -g 300 seafile
+ # useradd -u 300 -d /opt/haiwen -s /bin/false -g seafile seafile
+
+EOF
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/v$VERSION-server.tar.gz || \
+ tar xvf $CWD/$SRCNAM-$VERSION-server.tar.gz
+cd $SRCNAM-$VERSION-server
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+zcat $CWD/patch-seafile-controller-pid-path.diff.gz | patch -p0
+
+sh autogen.sh
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-riak \
+ --enable-fuse \
+ --disable-client \
+ --enable-server \
+ --enable-python \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/sbin
+install -m 0755 $CWD/seafile $PKG/usr/sbin
+
+mkdir -p $PKG/opt/haiwen/seafile-server
+cp -ar scripts $PKG/opt/haiwen/seafile-server
+chown -R seafile:seafile $PKG/opt/haiwen
+chmod 750 $PKG/opt/haiwen
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE.txt README.markdown $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/seafile-server/seafile-server.info b/network/seafile-server/seafile-server.info
new file mode 100644
index 0000000000..ad923b3e8c
--- /dev/null
+++ b/network/seafile-server/seafile-server.info
@@ -0,0 +1,10 @@
+PRGNAM="seafile-server"
+VERSION="4.0.5"
+HOMEPAGE="http://seafile.com/"
+DOWNLOAD="https://github.com/haiwen/seafile/archive/v4.0.5-server.tar.gz"
+MD5SUM="cb6543b6aecd7fe93f2b8d6a9252ff8f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="ccnet libevhtp seahub"
+MAINTAINER="Marcel Saegebarth"
+EMAIL="marc@mos6581.de"
diff --git a/network/seafile-server/slack-desc b/network/seafile-server/slack-desc
new file mode 100644
index 0000000000..85fe641994
--- /dev/null
+++ b/network/seafile-server/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+seafile-server: seafile-server (Cloud Storage System)
+seafile-server:
+seafile-server: Seafile is a next-generation open source cloud storage system with
+seafile-server: advanced support for file syncing, privacy protection and teamwork.
+seafile-server:
+seafile-server: Homepage: http://seafile.com/
+seafile-server:
+seafile-server:
+seafile-server:
+seafile-server:
+seafile-server: