seafile-server: add config options for extra features

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
This commit is contained in:
Gergely Kiss 2016-05-29 18:38:35 +02:00 committed by Etienne CHAMPETIER
parent 79563b699f
commit 2d17695c08
3 changed files with 72 additions and 7 deletions

View File

@ -0,0 +1,16 @@
menu "Configuration"
depends on PACKAGE_seafile-server
config SEAFILE_FUSE_SUPPORT
bool "Enable FUSE support"
default n
select PACKAGE_libfuse
config SEAFILE_CONSOLE_SUPPORT
bool "Enable seafile server console"
default n
config SEAFILE_RIAK_SUPPORT
bool "Enable support for riak backend"
default n
endmenu

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-server
PKG_VERSION:=5.1.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)-4
PKG_RELEASE=$(PKG_SOURCE_VERSION)-5
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
@ -33,21 +33,45 @@ define Package/seafile-server
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill $(ICONV_DEPENDS)
ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
DEPENDS += +libfuse
endif
EXTRA_DEPENDS:=seafile-ccnet (=5.1.1-6d94fdc4296d542a5552039dc13a67c3448e8b13-1), seafile-seahub (=5.1.1-95f762f396c81f840fe658ab983df53784083bb1-1)
MENU:=1
endef
define Package/seafile-server/config
source "$(SOURCE)/Config.in"
endef
define Package/seafile-server/description
Open source cloud storage with advanced features on privacy protection and teamwork.
endef
CONFIGURE_ARGS += --disable-riak \
--disable-client \
--disable-fuse \
CONFIGURE_ARGS += --disable-client \
--enable-server \
--enable-python \
--disable-static-build \
--disable-server-pkg \
--disable-console
--disable-server-pkg
ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
CONFIGURE_ARGS += --enable-fuse
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/fuse
else
CONFIGURE_ARGS += --disable-fuse
endif
ifeq ($(CONFIG_SEAFILE_CONSOLE_SUPPORT),y)
CONFIGURE_ARGS += --enable-console
else
CONFIGURE_ARGS += --disable-console
endif
ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y)
CONFIGURE_ARGS += --enable-riak
else
CONFIGURE_ARGS += --disable-riak
endif
PKG_BUILD_DEPENDS:=vala/host libevhtp
@ -71,6 +95,9 @@ define Package/seafile-server/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/scripts/seaf-gc.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/seaf-fsck.sh $(1)/usr/share/seafile/seafile-server/
ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
$(CP) $(PKG_BUILD_DIR)/scripts/seaf-fuse.sh $(1)/usr/share/seafile/seafile-server/
endif
$(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.py $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.py $(1)/usr/share/seafile/seafile-server/
@ -111,8 +138,9 @@ then
fi
else
echo "*** seafile-data directory already exists."
echo
echo "*** In case you are upgrading seafile, please run the appropriate upgrade script"
echo "*** manually before using the new version of Seafile."
echo "*** manually before using the new version."
echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\""
echo
echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html"

View File

@ -0,0 +1,21 @@
diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fuse.sh seafile-server-5.1.1/scripts/seaf-fuse.sh
--- seafile-server-5.1.1.orig/scripts/seaf-fuse.sh 2016-05-29 08:43:19.000000000 +0200
+++ seafile-server-5.1.1/scripts/seaf-fuse.sh 2016-05-29 09:13:06.286680653 +0200
@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
default_conf_dir=${TOPDIR}/conf
-seaf_fuse=${INSTALLPATH}/seafile/bin/seaf-fuse
+seaf_fuse=/usr/bin/seaf-fuse
export PATH=${INSTALLPATH}/seafile/bin:$PATH
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
@@ -68,7 +68,7 @@ function validate_already_running () {
}
function warning_if_seafile_not_running () {
- if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
+ if ! pgrep -f "seafile-controller -F ${default_conf_dir}" 2>/dev/null 1>&2; then
echo
echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
echo