Index: Makefile =================================================================== --- Makefile (revision 25) +++ Makefile (working copy) @@ -2,7 +2,7 @@ PORTNAME= seafile PORTVERSION= 3.1.4 -CATEGORIES= www +CATEGORIES= net-mgmt devel MAINTAINER= yan_jingfeng@yahoo.com COMMENT= Framework for writing networked applications @@ -9,8 +9,8 @@ LICENSE= GPLv3 -BUILD_DEPENDS+= valac:${PORTSDIR}/lang/vala -LIB_DEPENDS+= libsearpc.so:${PORTSDIR}/www/libsearpc \ +BUILD_DEPENDS= valac:${PORTSDIR}/lang/vala +LIB_DEPENDS= libsearpc.so:${PORTSDIR}/devel/libsearpc \ libevhtp.so:${PORTSDIR}/www/libevhtp \ libzdb.so:${PORTSDIR}/databases/libzdb \ libcrypto.so:${PORTSDIR}/security/openssl \ @@ -17,10 +17,8 @@ libarchive.so.13:${PORTSDIR}/archivers/libarchive \ libfuse.so:${PORTSDIR}/sysutils/fusefs-libs \ libinotify.so:${PORTSDIR}/devel/libinotify \ - libccnet.so:${PORTSDIR}/www/ccnet -RUN_DEPENDS= ccnet-server:${PORTSDIR}/www/ccnet \ - ccnet-init:${PORTSDIR}/www/ccnet \ - ${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \ + libccnet.so:${PORTSDIR}/net-mgmt/ccnet +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \ ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \ bash:${PORTSDIR}/shells/bash @@ -30,16 +28,12 @@ GH_TAGNAME= v3.1.4 GH_COMMIT= ac58109 -USES= libtool pkgconfig python:2 pathfix shebangfix +USES= autoreconf libtool pkgconfig python:2 pathfix shebangfix PATHFIX_MAKEFILEIN= Makefile.am USE_LDCONFIG= yes -USE_AUTOTOOLS= libtoolize aclocal autoheader automake autoconf -LIBTOOLIZE_ARGS=-i -c -f -ACLOCAL_ARGS= -I m4 -AUTOMAKE_ARGS= --add-missing --gnu -CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/event2 -LDFLAGS+= -L${LOCALBASE}/lib -L${LOCALBASE}/lib/event2 +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib MAKE_JOBS_UNSAFE=yes @@ -52,40 +46,36 @@ WWWDIR= ${PREFIX}/www/haiwen/seafile-server +SERVPORGS= fileserver \ + seaf-fsck \ + seafserv-gc \ + seaf-fuse \ + seaf-migrate \ + seaf-server \ + seaf-server-init \ + seafile-controller \ + seafserv-tool + +SERVSCRIPS= py \ + sh + post-install: - @${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/bin - @${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile - @${INSTALL} -m 0755 ${WRKSRC}/doc/seafile-tutorial.doc \ - ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile/ - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/fileserver \ - ${STAGEDIR}${WWWDIR}/seafile/bin/fileserver - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seaf-fsck \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fsck - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seafserv-gc \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-gc - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seaf-fuse \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seaf-fuse - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seaf-migrate \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seaf-migrate - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seaf-server \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seaf-server-init \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seaf-server-init - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seafile-controller \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seafile-controller - @${INSTALL} -m 0755 ${STAGEDIR}${PREFIX}/bin/seafserv-tool \ - ${STAGEDIR}${WWWDIR}/seafile/bin/seafserv-tool - @${INSTALL} -m 0755 ${WRKSRC}/scripts/*.py \ + @${MKDIR} ${STAGEDIR}${WWWDIR}/seafile/bin + @${MKDIR} ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile + @${MKDIR} ${STAGEDIR}${WWWDIR}/upgrade +.for _SERVPROG in ${SERVPORGS} + ${LN} ${STAGEDIR}${PREFIX}/bin/${_SERVPROG} \ + ${STAGEDIR}${WWWDIR}/seafile/bin/${_SERVPROG} +.endfor +.for _SERVSCRIPT in ${SERVSCRIPS} + ${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.${_SERVSCRIPT} \ ${STAGEDIR}${WWWDIR} - @${INSTALL} -m 0755 ${WRKSRC}/scripts/*.sh \ - ${STAGEDIR}${WWWDIR} - @${INSTALL} -d -m 0755 ${WRKSRC}/scripts/upgrade/ \ + ${INSTALL_SCRIPT} ${WRKSRC}/scripts/upgrade/*.${_SERVSCRIPT} \ ${STAGEDIR}${WWWDIR}/upgrade - @${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*py \ - ${STAGEDIR}${WWWDIR}/upgrade - @${INSTALL} -m 0755 ${WRKSRC}/scripts/upgrade/*sh \ - ${STAGEDIR}${WWWDIR}/upgrade - @${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \ +.endfor + ${INSTALL_DATA} ${WRKSRC}/doc/seafile-tutorial.doc \ + ${STAGEDIR}${WWWDIR}/seafile/share/doc/seafile/ + ${CP} -R ${WRKSRC}/scripts/upgrade/sql/ \ ${STAGEDIR}${WWWDIR}/upgrade/sql/ .include Index: files/patch-common_obj-backend-fs.c =================================================================== --- files/patch-common_obj-backend-fs.c (revision 12) +++ files/patch-common_obj-backend-fs.c (working copy) @@ -5,7 +5,7 @@ fsync_obj_contents (int fd) { -#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) /* Some file systems may not support fsync(). * In this case, just skip the error. */ @@ -14,7 +14,7 @@ rename_and_sync (const char *tmp_path, const char *obj_path) { -#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) char *parent_dir; int ret = 0; Index: files/patch-controller_seafile-controller.c =================================================================== --- files/patch-controller_seafile-controller.c (revision 12) +++ files/patch-controller_seafile-controller.c (working copy) @@ -4,7 +4,7 @@ #include "log.h" #include "seafile-controller.h" -+#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#endif + @@ -17,7 +17,7 @@ GError *error = NULL; +#if defined(__linux__) char *executable = g_file_read_link ("/proc/self/exe", &error); -+#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + char *executable = g_file_read_link ("/proc/curproc/file", &error); +#endif char *tmp = NULL; Index: files/patch-daemon_repo-mgr.c =================================================================== --- files/patch-daemon_repo-mgr.c (revision 12) +++ files/patch-daemon_repo-mgr.c (working copy) @@ -5,7 +5,7 @@ gboolean update_mode_only = FALSE; -#ifndef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + path = build_checkout_path (worktree, name, strlen(name)); +#else path = build_case_conflict_free_path (worktree, name, @@ -21,7 +21,7 @@ gboolean case_conflict = FALSE; -#ifndef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + path = build_checkout_path (worktree, name, strlen(name)); +#else path = build_case_conflict_free_path (worktree, name, @@ -37,7 +37,7 @@ char *new_path; gboolean case_conflict; -#ifndef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + 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, Index: files/patch-daemon_vc-utils.c =================================================================== --- files/patch-daemon_vc-utils.c (revision 12) +++ files/patch-daemon_vc-utils.c (working copy) @@ -5,7 +5,7 @@ #endif /* defined WIN32 || defined __APPLE__ */ -#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) static char * build_checkout_path (const char *worktree, const char *ce_name, int len) @@ -14,7 +14,7 @@ path_in = g_build_path ("/", o->base, ce->name, NULL); -#ifndef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + path = build_checkout_path (o->base, ce->name, ce_namelen(ce)); +#else path = build_case_conflict_free_path (o->base, ce->name, Index: files/patch-lib_utils.c =================================================================== --- files/patch-lib_utils.c (revision 24) +++ files/patch-lib_utils.c (working copy) @@ -5,7 +5,7 @@ #endif /* ifdef WIN32 */ -#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) /* read the link of /proc/123/exe and compare with `process_name' */ static int find_process_in_dirent(struct dirent *dir, const char *process_name) @@ -15,7 +15,7 @@ +#ifdef __linux__ if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) { +#endif -+#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) + if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) { +#endif return -1; Index: files/patch-lib_utils.h =================================================================== --- files/patch-lib_utils.h (revision 12) +++ files/patch-lib_utils.h (working copy) @@ -4,7 +4,7 @@ #ifndef CCNET_UTILS_H #define CCNET_UTILS_H -+#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#endif #include Index: pkg-plist =================================================================== --- pkg-plist (revision 19) +++ pkg-plist (working copy) @@ -94,34 +94,3 @@ %%WWWDIR%%/upgrade/upgrade_2.1_2.2.sh %%WWWDIR%%/upgrade/upgrade_2.2_3.0.sh %%WWWDIR%%/upgrade/upgrade_3.0_3.1.sh -@dirrmtry include/seafile -@dirrmtry %%PYTHON_SITELIBDIR%%/seafile -@dirrmtry %%PYTHON_SITELIBDIR%%/seaserv -%%PORTDOCS%%@dirrmtry %%WWWDIR%%/seafile/%%DOCSDIR%% -@dirrmtry %%WWWDIR%%/seafile/share/doc -@dirrmtry %%WWWDIR%%/seafile/share -@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/1.6.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/1.7.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/1.8.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/2.0.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/2.1.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/2.2.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/3.0.0 -@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/mysql -@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0/sqlite3 -@dirrmtry %%WWWDIR%%/upgrade/sql/3.1.0 -@dirrmtry %%WWWDIR%%/upgrade/sql -@dirrmtry %%WWWDIR%%/upgrade