net-mgmt/seafile: Upgrade version 3.1.4 => 4.0.6
PR: 197980 Submitted by: maintainer (JingFeng Yan)
This commit is contained in:
parent
76178d4370
commit
ff71cd6800
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380219
15 changed files with 205 additions and 151 deletions
|
@ -1,8 +1,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= seafile
|
||||
PORTVERSION= 3.1.4
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 4.0.6
|
||||
CATEGORIES= net-mgmt devel
|
||||
|
||||
MAINTAINER= yan_jingfeng@yahoo.com
|
||||
|
@ -16,6 +15,7 @@ LIB_DEPENDS= libsearpc.so:${PORTSDIR}/devel/libsearpc \
|
|||
libzdb.so:${PORTSDIR}/databases/libzdb \
|
||||
libcrypto.so:${PORTSDIR}/security/openssl \
|
||||
libarchive.so.13:${PORTSDIR}/archivers/libarchive \
|
||||
libcurl.so:${PORTSDIR}/ftp/curl \
|
||||
libinotify.so:${PORTSDIR}/devel/libinotify \
|
||||
libccnet.so:${PORTSDIR}/net-mgmt/ccnet
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \
|
||||
|
@ -25,8 +25,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestin
|
|||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= haiwen
|
||||
GH_TAGNAME= v3.1.4
|
||||
GH_COMMIT= ac58109
|
||||
GH_TAGNAME= v${PORTVERSION}-server
|
||||
GH_COMMIT= adf9a87
|
||||
|
||||
USES= autoreconf iconv libtool pathfix pkgconfig python:2 shebangfix
|
||||
SHEBANG_FILES= scripts/*.sh scripts/upgrade/*.sh
|
||||
|
@ -78,8 +78,8 @@ post-install:
|
|||
@${MKDIR} ${STAGEDIR}${PREFIX}/${SEABIN} ${STAGEDIR}${PREFIX}/${SEALIB}\
|
||||
${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/seafile/share/doc/seafile \
|
||||
${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade
|
||||
.for SERVPROG in fileserver seaf-fsck seafserv-gc seaf-fuse seaf-migrate \
|
||||
seaf-server seaf-server-init seafile-controller seafserv-tool
|
||||
.for SERVPROG in seaf-fsck seafserv-gc seaf-fuse seaf-migrate \
|
||||
seaf-server seaf-server-init seafile-controller
|
||||
if [ -e "${STAGEDIR}${PREFIX}/bin/${SERVPROG}" ]; then \
|
||||
${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG} ${STAGEDIR}${PREFIX}/${SEABIN}; \
|
||||
${RM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG}; \
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (seafile-3.1.4.tar.gz) = 0ef5d6947ebc74ce5c37390d74b4c1ad7f0da7359f0c8d263963dd04dccf7306
|
||||
SIZE (seafile-3.1.4.tar.gz) = 1047684
|
||||
SHA256 (seafile-4.0.6.tar.gz) = af1b568905a85ba2da06593f93a70226526ad310320c071bd70356fb77106bc9
|
||||
SIZE (seafile-4.0.6.tar.gz) = 1082450
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- common/obj-backend-fs.c.orig 2014-08-30 10:00:33.108962525 -0400
|
||||
+++ common/obj-backend-fs.c 2014-08-30 10:03:02.405000733 -0400
|
||||
--- common/obj-backend-fs.c.orig 2015-01-28 02:14:45.000000000 -0500
|
||||
+++ common/obj-backend-fs.c 2015-01-28 02:15:58.000000000 -0500
|
||||
@@ -101,7 +101,7 @@
|
||||
static int
|
||||
fsync_obj_contents (int fd)
|
||||
|
|
|
@ -1,70 +1,117 @@
|
|||
--- configure.ac.orig 2014-08-05 01:28:35.000000000 -0400
|
||||
+++ configure.ac 2014-11-22 13:34:26.927863521 -0500
|
||||
@@ -88,7 +88,7 @@
|
||||
[compile_riak=$enableval],[compile_riak="no"])
|
||||
|
||||
AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]),
|
||||
- [compile_fuse=$enableval],[compile_fuse="yes"])
|
||||
+ [compile_fuse=$enableval],[compile_fuse="no"])
|
||||
--- configure.ac.orig 2015-01-21 22:45:28.000000000 -0500
|
||||
+++ configure.ac 2015-01-28 14:01:20.000000000 -0500
|
||||
@@ -50,8 +50,16 @@
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
+AC_MSG_CHECKING(for BSD)
|
||||
+if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then
|
||||
+ bbsd=true
|
||||
+ AC_MSG_RESULT(compile in BSD)
|
||||
+else
|
||||
+ AC_MSG_RESULT(no)
|
||||
+fi
|
||||
+
|
||||
AC_MSG_CHECKING(for Linux)
|
||||
-if test "$bmac" != "true" -a "$bwin32" != "true"; then
|
||||
+if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then
|
||||
blinux=true
|
||||
AC_MSG_RESULT(compile in linux)
|
||||
else
|
||||
@@ -93,6 +101,11 @@
|
||||
[compile_fuse=$enableval],[compile_fuse="yes"])
|
||||
fi
|
||||
|
||||
+if test "$bbsd" = true; then
|
||||
+ AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]),
|
||||
+ [compile_fuse=$enableval],[compile_fuse="no"])
|
||||
+fi
|
||||
+
|
||||
AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client], [enable client]),
|
||||
@@ -199,25 +199,28 @@
|
||||
[compile_client=$enableval],[compile_client="yes"])
|
||||
|
||||
@@ -148,6 +161,7 @@
|
||||
|
||||
AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
|
||||
AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
|
||||
+AM_CONDITIONAL([BSD], [test "$bbsd" = "true"])
|
||||
AM_CONDITIONAL([LINUX], [test "$blinux" = "true"])
|
||||
|
||||
|
||||
@@ -192,6 +206,9 @@
|
||||
LIB_PSAPI=-lpsapi
|
||||
LIB_MAC=
|
||||
MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601"
|
||||
+ ZLIB_LIBS=
|
||||
+ LIB_INOTIFY=
|
||||
+ LIB_KVM=
|
||||
elif test "$bmac" = true ; then
|
||||
LIB_WS32=
|
||||
LIB_GDI32=
|
||||
LIB_RT=
|
||||
LIB_INTL=
|
||||
- LIB_RESOLV=-lresolv
|
||||
+ LIB_RESOLV=
|
||||
LIB_UUID=-luuid
|
||||
LIB_IPHLPAPI=
|
||||
LIB_SHELL32=
|
||||
@@ -204,6 +221,24 @@
|
||||
LIB_PSAPI=
|
||||
MSVC_CFLAGS=
|
||||
LIB_MAC="-framework CoreServices"
|
||||
+ ZLIB_LIBS=
|
||||
+ LIB_INOTIFY=
|
||||
+ LIB_KVM=
|
||||
+elif test "$bbsd" = true ; then
|
||||
+ LIB_WS32=
|
||||
+ LIB_GDI32=
|
||||
+ LIB_RT=
|
||||
+ LIB_INTL=
|
||||
+ LIB_RESOLV=
|
||||
+ LIB_UUID=-luuid
|
||||
+ LIB_IPHLPAPI=
|
||||
+ LIB_SHELL32=
|
||||
+ LIB_PSAPI=
|
||||
+ LIB_MAC=
|
||||
+ MSVC_CFLAGS=
|
||||
+ ZLIB_LIBS=-lz
|
||||
+ LIB_INOTIFY=-linotify
|
||||
+ LIB_KVM=-lkvm
|
||||
else
|
||||
LIB_WS32=
|
||||
LIB_GDI32=
|
||||
LIB_RT=
|
||||
LIB_INTL=
|
||||
- LIB_RESOLV=-lresolv
|
||||
+ LIB_RESOLV=
|
||||
LIB_UUID=-luuid
|
||||
LIB_IPHLPAPI=
|
||||
LIB_SHELL32=
|
||||
@@ -216,6 +251,9 @@
|
||||
LIB_PSAPI=
|
||||
LIB_MAC=
|
||||
MSVC_CFLAGS=
|
||||
+ ZLIB_LIBS=-lz
|
||||
+ LIB_INOTIFY=-linotify
|
||||
+ LIB_KVM=
|
||||
fi
|
||||
|
||||
AC_SUBST(LIB_WS32)
|
||||
@@ -230,6 +233,8 @@
|
||||
@@ -228,6 +266,9 @@
|
||||
AC_SUBST(LIB_SHELL32)
|
||||
AC_SUBST(LIB_PSAPI)
|
||||
AC_SUBST(LIB_MAC)
|
||||
+AC_SUBST(ZLIB_LIBS)
|
||||
+AC_SUBST(LIB_INOTIFY)
|
||||
+AC_SUBST(LIB_KVM)
|
||||
AC_SUBST(MSVC_CFLAGS)
|
||||
|
||||
|
||||
@@ -242,7 +247,6 @@
|
||||
@@ -240,7 +281,9 @@
|
||||
#LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1
|
||||
CURL_REQUIRED=7.17
|
||||
FUSE_REQUIRED=2.8.6
|
||||
-ZLIB_REQUIRED=1.2.0
|
||||
FUSE_REQUIRED=2.7.3
|
||||
+if test "$blinux" = true ; then
|
||||
ZLIB_REQUIRED=1.2.0
|
||||
+fi
|
||||
|
||||
PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED])
|
||||
AC_SUBST(GLIB2_CFLAGS)
|
||||
@@ -268,10 +272,6 @@
|
||||
PKG_CHECK_MODULES(SSL, [openssl])
|
||||
AC_SUBST(SSL_CFLAGS)
|
||||
@@ -270,9 +313,11 @@
|
||||
AC_SUBST(LIBEVENT_CFLAGS)
|
||||
AC_SUBST(LIBEVENT_LIBS)
|
||||
|
||||
-PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
|
||||
-AC_SUBST(ZLIB_CFLAGS)
|
||||
-AC_SUBST(ZLIB_LIBS)
|
||||
-
|
||||
+if test "$blinux" = true ; then
|
||||
PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
|
||||
AC_SUBST(ZLIB_CFLAGS)
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
+fi
|
||||
|
||||
if test x${compile_python} = xyes; then
|
||||
AM_PATH_PYTHON([2.6])
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- controller/seafile-controller.c.orig 2014-08-05 01:28:35.000000000 -0400
|
||||
+++ controller/seafile-controller.c 2014-11-22 22:00:58.614945337 -0500
|
||||
@@ -18,10 +18,23 @@
|
||||
--- controller/seafile-controller.c.orig 2015-01-28 13:03:24.000000000 -0500
|
||||
+++ controller/seafile-controller.c 2015-01-28 13:15:05.000000000 -0500
|
||||
@@ -17,6 +17,19 @@
|
||||
#include "log.h"
|
||||
#include "seafile-controller.h"
|
||||
|
||||
|
@ -14,17 +14,13 @@
|
|||
+#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS)
|
||||
+#endif
|
||||
+
|
||||
+static char *command_name = NULL;
|
||||
+#endif
|
||||
+
|
||||
#define CHECK_PROCESS_INTERVAL 10 /* every 10 seconds */
|
||||
|
||||
SeafileController *ctl;
|
||||
|
||||
+static char *command_name = NULL;
|
||||
static char *controller_pidfile = NULL;
|
||||
|
||||
char *bin_dir = NULL;
|
||||
@@ -273,7 +286,20 @@
|
||||
@@ -247,7 +260,20 @@
|
||||
init_seafile_path ()
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
@ -39,13 +35,13 @@
|
|||
+ char * rc = realpath(command_name, executable);
|
||||
+ if (!rc) {
|
||||
+ seaf_warning ("failed to readpath: %s\n", executable);
|
||||
+ return;
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
char *tmp = NULL;
|
||||
if (error != NULL) {
|
||||
seaf_warning ("failed to readlink: %s\n", error->message);
|
||||
@@ -287,7 +313,9 @@
|
||||
@@ -261,7 +287,9 @@
|
||||
|
||||
topdir = g_path_get_dirname (installpath);
|
||||
|
||||
|
@ -55,7 +51,7 @@
|
|||
g_free (tmp);
|
||||
}
|
||||
|
||||
@@ -427,12 +455,41 @@
|
||||
@@ -401,11 +429,40 @@
|
||||
return FALSE;
|
||||
} else {
|
||||
char buf[256];
|
||||
|
@ -73,7 +69,6 @@
|
|||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
- }
|
||||
+ }
|
||||
+
|
||||
+ } else {
|
||||
|
@ -94,15 +89,16 @@
|
|||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -892,6 +949,7 @@
|
||||
@@ -852,6 +909,9 @@
|
||||
exit (1);
|
||||
}
|
||||
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+ command_name = argv[0];
|
||||
+#endif
|
||||
char *config_dir = DEFAULT_CONFIG_DIR;
|
||||
char *seafile_dir = NULL;
|
||||
char *logdir = NULL;
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
--- daemon/Makefile.am.orig 2014-08-05 01:28:35.000000000 -0400
|
||||
+++ daemon/Makefile.am 2014-08-30 01:44:16.911202899 -0400
|
||||
@@ -125,7 +125,8 @@
|
||||
@GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
|
||||
--- daemon/Makefile.am.orig 2015-01-28 13:48:56.000000000 -0500
|
||||
+++ daemon/Makefile.am 2015-01-28 13:55:22.000000000 -0500
|
||||
@@ -65,6 +65,10 @@
|
||||
wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c
|
||||
endif
|
||||
|
||||
+if BSD
|
||||
+wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c
|
||||
+endif
|
||||
+
|
||||
if WIN32
|
||||
wt_monitor_src = wt-monitor.c wt-monitor-win32.c wt-monitor-structs.c
|
||||
endif
|
||||
@@ -127,7 +131,8 @@
|
||||
@GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ \
|
||||
$(top_builddir)/common/cdc/libcdc.la \
|
||||
$(top_builddir)/common/index/libindex.la ${LIB_WS32} \
|
||||
- @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@
|
||||
+ @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ \
|
||||
+ @ZLIB_LIBS@ @LIB_INOTIFY@
|
||||
- @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@
|
||||
+ @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ \
|
||||
+ @CURL_LIBS@ @LIB_INOTIFY@
|
||||
|
||||
seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- daemon/repo-mgr.c.orig 2014-08-30 02:03:22.367472662 -0400
|
||||
+++ daemon/repo-mgr.c 2014-08-30 02:10:42.071207749 -0400
|
||||
@@ -1720,12 +1720,12 @@
|
||||
--- daemon/repo-mgr.c.orig 2015-01-28 02:18:05.000000000 -0500
|
||||
+++ daemon/repo-mgr.c 2015-01-28 02:22:10.000000000 -0500
|
||||
@@ -2514,13 +2514,13 @@
|
||||
gboolean force_conflict = FALSE;
|
||||
gboolean update_mode_only = FALSE;
|
||||
|
||||
|
@ -10,13 +10,14 @@
|
|||
+#else
|
||||
path = build_case_conflict_free_path (worktree, name,
|
||||
conflict_hash, no_conflict_hash,
|
||||
&case_conflict);
|
||||
&case_conflict,
|
||||
FALSE);
|
||||
-#else
|
||||
- path = build_checkout_path (worktree, name, strlen(name));
|
||||
#endif
|
||||
|
||||
if (!path)
|
||||
@@ -1858,12 +1858,12 @@
|
||||
@@ -2675,13 +2675,13 @@
|
||||
char *path;
|
||||
gboolean case_conflict = FALSE;
|
||||
|
||||
|
@ -26,25 +27,27 @@
|
|||
+#else
|
||||
path = build_case_conflict_free_path (worktree, name,
|
||||
conflict_hash, no_conflict_hash,
|
||||
&case_conflict);
|
||||
&case_conflict,
|
||||
FALSE);
|
||||
-#else
|
||||
- path = build_checkout_path (worktree, name, strlen(name));
|
||||
#endif
|
||||
|
||||
if (!path)
|
||||
@@ -2088,12 +2088,12 @@
|
||||
@@ -2839,13 +2839,13 @@
|
||||
old_path = g_build_filename (worktree, de->name, NULL);
|
||||
|
||||
char *new_path;
|
||||
gboolean case_conflict;
|
||||
if (seaf_util_exists (old_path)) {
|
||||
-#ifndef __linux__
|
||||
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+ new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
|
||||
+ new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
|
||||
+#else
|
||||
new_path = build_case_conflict_free_path (worktree, de->new_name,
|
||||
conflict_hash, no_conflict_hash,
|
||||
&case_conflict);
|
||||
new_path = build_case_conflict_free_path (worktree, de->new_name,
|
||||
conflict_hash, no_conflict_hash,
|
||||
&case_conflict,
|
||||
TRUE);
|
||||
-#else
|
||||
- new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
|
||||
- new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
|
||||
#endif
|
||||
|
||||
if (g_file_test (old_path, G_FILE_TEST_EXISTS) &&
|
||||
if (seaf_util_rename (old_path, new_path) < 0) {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- daemon/vc-utils.c.orig 2014-06-05 02:25:50.000000000 -0400
|
||||
+++ daemon/vc-utils.c 2014-07-27 01:10:00.000000000 -0400
|
||||
@@ -489,7 +489,7 @@
|
||||
--- daemon/vc-utils.c.orig 2015-01-28 02:24:19.000000000 -0500
|
||||
+++ daemon/vc-utils.c 2015-01-28 02:30:05.000000000 -0500
|
||||
@@ -664,7 +664,7 @@
|
||||
|
||||
#endif /* defined WIN32 || defined __APPLE__ */
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
||||
static char *
|
||||
char *
|
||||
build_checkout_path (const char *worktree, const char *ce_name, int len)
|
||||
@@ -549,12 +549,12 @@
|
||||
@@ -724,13 +724,13 @@
|
||||
gboolean force_conflict = FALSE;
|
||||
|
||||
path_in = g_build_path ("/", o->base, ce->name, NULL);
|
||||
|
@ -19,7 +19,8 @@
|
|||
+#else
|
||||
path = build_case_conflict_free_path (o->base, ce->name,
|
||||
conflict_hash, no_conflict_hash,
|
||||
&case_conflict);
|
||||
&case_conflict,
|
||||
FALSE);
|
||||
-#else
|
||||
- path = build_checkout_path (o->base, ce->name, ce_namelen(ce));
|
||||
#endif
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
--- lib/Makefile.am.orig 2014-11-11 10:47:33.631976054 -0500
|
||||
+++ lib/Makefile.am 2014-11-11 11:40:14.030311321 -0500
|
||||
@@ -55,7 +55,7 @@
|
||||
--- lib/Makefile.am.orig 2015-01-28 13:44:26.000000000 -0500
|
||||
+++ lib/Makefile.am 2015-01-28 13:48:00.000000000 -0500
|
||||
@@ -53,6 +53,7 @@
|
||||
libseafile_common_la_LDFLAGS = -no-undefined
|
||||
libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ -lssl -lcrypto @LIB_GDI32@ \
|
||||
libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ -lcrypto @LIB_GDI32@ \
|
||||
@LIB_UUID@ @LIB_WS32@ @LIB_PSAPI@ -lsqlite3 \
|
||||
- -levent @SEARPC_LIBS@ @LIB_SHELL32@ \
|
||||
+ -levent -lkvm @SEARPC_LIBS@ @LIB_SHELL32@ \
|
||||
+ @LIB_KVM@ \
|
||||
@LIBEVENT_LIBS@ @SEARPC_LIBS@ @LIB_SHELL32@ \
|
||||
@ZLIB_LIBS@
|
||||
|
||||
searpc_gen = searpc-signature.h searpc-marshal.h
|
||||
@@ -72,8 +72,4 @@
|
||||
rm -f $(top_srcdir)/lib/rpc_table.pyc
|
||||
@@ -74,7 +75,7 @@
|
||||
rm -f ${seafile_object_gen}
|
||||
@rm -f vala.tmp
|
||||
@touch vala.tmp
|
||||
- valac -C --pkg posix $^
|
||||
+ valac -C --pkg posix ${seafile_object_define}
|
||||
@mv -f vala.tmp $@
|
||||
|
||||
install-data-local:
|
||||
-if MACOS
|
||||
- sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
|
||||
-else
|
||||
- ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
|
||||
-endif
|
||||
+ ${SED} -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
|
||||
${seafile_object_gen}: vala.stamp
|
||||
@@ -90,5 +91,9 @@
|
||||
if MACOS
|
||||
sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
|
||||
else
|
||||
+if BSD
|
||||
+ sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
|
||||
+else
|
||||
${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
|
||||
endif
|
||||
+endif
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
--- lib/libseafile.pc.in.orig 2014-09-03 23:00:38.555065334 -0400
|
||||
+++ lib/libseafile.pc.in 2014-09-03 23:01:13.715468049 -0400
|
||||
@@ -3,9 +3,9 @@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
-Name: libccnet
|
||||
+Name: libseafile
|
||||
Description: Client library for accessing seafile service.
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lseafile @SEARPC_LIBS@
|
||||
Cflags: -I${includedir} @SEARPC_CFLAGS@
|
||||
-Requires: gobject-2.0 glib-2.0
|
||||
\ No newline at end of file
|
||||
+Requires: gobject-2.0 glib-2.0
|
|
@ -1,11 +1,14 @@
|
|||
--- lib/net.c.orig 2014-09-02 21:09:59.708953392 -0400
|
||||
+++ lib/net.c 2014-09-02 21:10:22.959507209 -0400
|
||||
@@ -157,7 +157,7 @@
|
||||
--- lib/net.c.orig 2015-01-28 00:52:56.000000000 -0500
|
||||
+++ lib/net.c 2015-01-28 00:55:31.000000000 -0500
|
||||
@@ -157,7 +157,11 @@
|
||||
|
||||
snprintf (buf, sizeof(buf), "%d", port);
|
||||
|
||||
- if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
|
||||
+#else
|
||||
if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
|
||||
+#endif
|
||||
ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
--- lib/utils.c.orig 2014-08-05 05:28:35 UTC
|
||||
+++ lib/utils.c
|
||||
@@ -46,6 +46,15 @@
|
||||
--- lib/utils.c.orig 2015-01-28 01:03:42.000000000 -0500
|
||||
+++ lib/utils.c 2015-01-28 01:26:32.000000000 -0500
|
||||
@@ -56,6 +56,16 @@
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#include <netinet/in.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <kvm.h>
|
||||
+#include <paths.h>
|
||||
|
@ -16,7 +17,7 @@
|
|||
extern int inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
|
||||
@@ -1756,14 +1765,19 @@ wchar_from_utf8 (const char *utf8)
|
||||
@@ -2097,14 +2107,19 @@
|
||||
|
||||
#endif /* ifdef WIN32 */
|
||||
|
||||
|
@ -27,17 +28,17 @@
|
|||
{
|
||||
char path[512];
|
||||
/* fisrst construct a path like /proc/123/exe */
|
||||
+#ifdef __linux__
|
||||
+#if defined(__linux__)
|
||||
if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
|
||||
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
|
||||
+ if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
|
||||
+#else
|
||||
+ if (TRUE) {
|
||||
+ if (1) {
|
||||
+#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1787,7 +1801,8 @@ find_process_in_dirent(struct dirent *di
|
||||
@@ -2128,7 +2143,8 @@
|
||||
}
|
||||
|
||||
/* read the /proc fs to determine whether some process is running */
|
||||
|
@ -47,7 +48,7 @@
|
|||
{
|
||||
DIR *proc_dir = opendir("/proc");
|
||||
if (!proc_dir) {
|
||||
@@ -1812,7 +1827,8 @@ gboolean process_is_running (const char
|
||||
@@ -2153,7 +2169,8 @@
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -57,12 +58,12 @@
|
|||
{
|
||||
int count = 0;
|
||||
DIR *proc_dir = opendir("/proc");
|
||||
@@ -1836,6 +1852,14 @@ int count_process(const char *process_na
|
||||
@@ -2177,6 +2194,14 @@
|
||||
return count;
|
||||
}
|
||||
|
||||
+#ifdef __linux__
|
||||
+gboolean process_is_running (const char *process_name) {
|
||||
+gboolean process_is_running(const char *process_name) {
|
||||
+ return process_is_running_procfs(process_name);
|
||||
+}
|
||||
+
|
||||
|
@ -72,7 +73,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -1846,6 +1870,120 @@ gboolean process_is_running (const char
|
||||
@@ -2187,6 +2212,119 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -188,7 +189,6 @@
|
|||
+ return count_running_process_kvm(process_name);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
char*
|
||||
ccnet_object_type_from_id (const char *object_id)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- lib/utils.h.orig 2014-08-05 01:28:35.000000000 -0400
|
||||
+++ lib/utils.h 2014-11-11 11:30:51.843637061 -0500
|
||||
--- lib/utils.h.orig 2015-01-28 00:57:13.000000000 -0500
|
||||
+++ lib/utils.h 2015-01-28 01:01:59.000000000 -0500
|
||||
@@ -3,6 +3,9 @@
|
||||
#ifndef CCNET_UTILS_H
|
||||
#define CCNET_UTILS_H
|
||||
|
@ -17,7 +17,7 @@
|
|||
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
+#include <evutil.h>
|
||||
+#elif (__NetBSD__) || defined(__OpenBSD__)
|
||||
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <event2/util.h>
|
||||
#else
|
||||
#include <evutil.h>
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
--- scripts/setup-seafile.sh.orig 2014-08-28 05:24:34.830623727 -0400
|
||||
+++ scripts/setup-seafile.sh 2014-08-28 05:27:43.095059196 -0400
|
||||
@@ -341,7 +341,7 @@
|
||||
--- scripts/setup-seafile.sh.orig 2015-01-28 00:37:17.000000000 -0500
|
||||
+++ scripts/setup-seafile.sh 2015-01-28 00:43:26.000000000 -0500
|
||||
@@ -339,7 +339,11 @@
|
||||
}
|
||||
|
||||
function copy_user_manuals() {
|
||||
- src_docs_dir=${INSTALLPATH}/seafile/docs/
|
||||
+ src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/
|
||||
+ if [ $(uname | grep -e BSD -e DragonFly | wc -l) == "1" ]; then
|
||||
+ src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/
|
||||
+ else
|
||||
+ src_docs_dir=${INSTALLPATH}/seafile/docs/
|
||||
+ fi
|
||||
library_template_dir=${seafile_data_dir}/library-template
|
||||
mkdir -p ${library_template_dir}
|
||||
cp -f ${src_docs_dir}/*.doc ${library_template_dir}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
bin/seaf-cli
|
||||
bin/seaf-daemon
|
||||
bin/seafile
|
||||
bin/seafile-admin
|
||||
include/seafile/monitor-rpc.h
|
||||
include/seafile/seafile-object.h
|
||||
|
@ -11,17 +10,14 @@ lib/libseafile.so
|
|||
lib/libseafile.so.0
|
||||
lib/libseafile.so.0.0.0
|
||||
libdata/pkgconfig/libseafile.pc
|
||||
man/man1/ccnet.1.gz
|
||||
man/man1/seaf-cli.1.gz
|
||||
man/man1/seaf-daemon.1.gz
|
||||
man/man1/seafile-applet.1.gz
|
||||
%%SEAFILE_SERVER%%/check_init_admin.py
|
||||
%%SEAFILE_SERVER%%/reset-admin.sh
|
||||
%%SEAFILE_SERVER%%/seaf-cli-wrapper.sh
|
||||
%%SEAFILE_SERVER%%/seaf-fuse.sh
|
||||
%%SEAFILE_SERVER%%/seaf-gc.sh
|
||||
%%SEAFILE_SERVER%%/seafile.sh
|
||||
%%SEAFILE_SERVER%%/seafile/bin/fileserver
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seaf-fsck
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seaf-fuse
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seaf-migrate
|
||||
|
@ -29,7 +25,6 @@ man/man1/seafile-applet.1.gz
|
|||
%%SEAFILE_SERVER%%/seafile/bin/seaf-server-init
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seafile-controller
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seafserv-gc
|
||||
%%SEAFILE_SERVER%%/seafile/bin/seafserv-tool
|
||||
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.py
|
||||
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyc
|
||||
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyo
|
||||
|
@ -85,4 +80,5 @@ man/man1/seafile-applet.1.gz
|
|||
%%SEAFILE_SERVER%%/upgrade/upgrade_2.1_2.2.sh
|
||||
%%SEAFILE_SERVER%%/upgrade/upgrade_2.2_3.0.sh
|
||||
%%SEAFILE_SERVER%%/upgrade/upgrade_3.0_3.1.sh
|
||||
%%SEAFILE_SERVER%%/upgrade/upgrade_3.1_4.0.sh
|
||||
@dir(%%SEAFILE_USERNAME%%,%%SEAFILE_GROUPNAME%%,755) %%HAIWENDIR%%
|
||||
|
|
Loading…
Reference in a new issue