diff --git a/devel/libsearpc/Makefile b/devel/libsearpc/Makefile index 1bdcc76665ee..2b433c9fa155 100644 --- a/devel/libsearpc/Makefile +++ b/devel/libsearpc/Makefile @@ -2,6 +2,7 @@ PORTNAME= libsearpc PORTVERSION= 3.0.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yan_jingfeng@yahoo.com @@ -25,4 +26,22 @@ PATHFIX_MAKEFILEIN= Makefile.am GNU_CONFIGURE= yes INSTALL_TARGET= install-strip +HAIWENDIR= www/haiwen +SEAFILE_SERVER= ${HAIWENDIR}/seafile-server +SEALIB= ${SEAFILE_SERVER}/seafile/lib + +SEAFILE_USERNAME?= www +SEAFILE_GROUPNAME?= ${SEAFILE_USERNAME} + +PLIST_SUB= SEAFILE_USERNAME=${SEAFILE_USERNAME} \ + SEAFILE_GROUPNAME=${SEAFILE_GROUPNAME} \ + SEAFILE_SERVER=${SEAFILE_SERVER} \ + HAIWENDIR=${HAIWENDIR} + +post-install: + @${MKDIR} ${STAGEDIR}${SEALIB} + (cd ${STAGEDIR}${PREFIX}/lib && \ + ${COPYTREE_SHARE} ${PYTHON_VERSION} ${STAGEDIR}${PREFIX}/${SEALIB}) + ${RM} -rf ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION} + .include diff --git a/devel/libsearpc/files/patch-Makefile.am b/devel/libsearpc/files/patch-Makefile.am index 441909a75e6e..f75ed9b4cf66 100644 --- a/devel/libsearpc/files/patch-Makefile.am +++ b/devel/libsearpc/files/patch-Makefile.am @@ -1,15 +1,15 @@ ---- Makefile.am.orig 2014-08-14 11:48:58.000000000 -0400 -+++ Makefile.am 2014-09-06 03:15:27.906790580 -0400 -@@ -19,11 +19,7 @@ - SUBDIRS = lib pysearpc ${MAKE_DEMO} tests - - 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)||g" $(pcfiles) +--- Makefile.am.orig 2015-02-16 05:30:39 UTC ++++ Makefile.am +@@ -22,8 +22,12 @@ install-data-local: + 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 dist-hook: git log -1 > $(distdir)/latest_commit diff --git a/devel/libsearpc/files/patch-configure.ac b/devel/libsearpc/files/patch-configure.ac new file mode 100644 index 000000000000..a4f7d64455f4 --- /dev/null +++ b/devel/libsearpc/files/patch-configure.ac @@ -0,0 +1,19 @@ +--- configure.ac.orig 2014-08-14 15:48:58 UTC ++++ configure.ac +@@ -68,6 +68,16 @@ fi + AM_CONDITIONAL([MACOS], [test "$bmac" = "yes"]) + AC_SUBST(MACOS) + ++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) ++fi ++ ++AM_CONDITIONAL([BSD], [test "$bbsd" = "true"]) ++AC_SUBST(BSD) ++ + # Checks for libraries. + + GLIB_REQUIRED=2.26.0 diff --git a/devel/libsearpc/pkg-plist b/devel/libsearpc/pkg-plist index d2a9cec6d6d2..9c3e911f92e2 100644 --- a/devel/libsearpc/pkg-plist +++ b/devel/libsearpc/pkg-plist @@ -7,16 +7,17 @@ lib/libsearpc.a lib/libsearpc.so lib/libsearpc.so.1 lib/libsearpc.so.1.0.2 -%%PYTHON_SITELIBDIR%%/pysearpc/__init__.py -%%PYTHON_SITELIBDIR%%/pysearpc/__init__.pyc -%%PYTHON_SITELIBDIR%%/pysearpc/__init__.pyo -%%PYTHON_SITELIBDIR%%/pysearpc/client.py -%%PYTHON_SITELIBDIR%%/pysearpc/client.pyc -%%PYTHON_SITELIBDIR%%/pysearpc/client.pyo -%%PYTHON_SITELIBDIR%%/pysearpc/common.py -%%PYTHON_SITELIBDIR%%/pysearpc/common.pyc -%%PYTHON_SITELIBDIR%%/pysearpc/common.pyo -%%PYTHON_SITELIBDIR%%/pysearpc/server.py -%%PYTHON_SITELIBDIR%%/pysearpc/server.pyc -%%PYTHON_SITELIBDIR%%/pysearpc/server.pyo libdata/pkgconfig/libsearpc.pc +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/__init__.py +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/__init__.pyc +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/__init__.pyo +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/client.py +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/client.pyc +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/client.pyo +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/common.py +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/common.pyc +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/common.pyo +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/server.py +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/server.pyc +%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/pysearpc/server.pyo +@dir(%%SEAFILE_USERNAME%%,%%SEAFILE_GROUPNAME%%,755) %%HAIWENDIR%%