Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 2014 19:32:44 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372231 - in head/net-mgmt/ccnet: . files
Message-ID:  <201411061932.sA6JWim6027531@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Thu Nov  6 19:32:44 2014
New Revision: 372231
URL: https://svnweb.freebsd.org/changeset/ports/372231
QAT: https://qat.redports.org/buildarchive/r372231/

Log:
  net-mgmt/ccnet: Fix post-install and support other BSDs
  
  PR:		194853
  Submitted by:	maintainer (Jingfeng Yan)

Modified:
  head/net-mgmt/ccnet/Makefile
  head/net-mgmt/ccnet/files/patch-lib_utils.c
  head/net-mgmt/ccnet/files/patch-net_common_getgateway.c

Modified: head/net-mgmt/ccnet/Makefile
==============================================================================
--- head/net-mgmt/ccnet/Makefile	Thu Nov  6 19:19:31 2014	(r372230)
+++ head/net-mgmt/ccnet/Makefile	Thu Nov  6 19:32:44 2014	(r372231)
@@ -2,6 +2,7 @@
 
 PORTNAME=	ccnet
 PORTVERSION=	3.1.4
+PORTREVISION=	1
 CATEGORIES=	net-mgmt devel
 
 MAINTAINER=	yan_jingfeng@yahoo.com
@@ -39,12 +40,11 @@ WITH_OPENSSL_PORT=	yes
 USE_OPENSSL=	yes
 
 WWWDIR=		${PREFIX}/www/haiwen/seafile-server
+SEABIN=		${STAGEDIR}${WWWDIR}/seafile/bin
 
 post-install:
-	@${MKDIR} -m 0755 ${STAGEDIR}${WWWDIR}/seafile/bin
-	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/ccnet-init \
-		${STAGEDIR}${WWWDIR}/seafile/bin/ccnet-init
-	${INSTALL} -m 0755  ${STAGEDIR}${PREFIX}/bin/ccnet-server \
-		${STAGEDIR}${WWWDIR}/seafile/bin/ccnet-server
+	@${MKDIR} ${SEABIN}
+	${LN} ${STAGEDIR}${PREFIX}/bin/ccnet-init ${SEABIN}
+	${LN} ${STAGEDIR}${PREFIX}/bin/ccnet-server ${SEABIN}
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/ccnet/files/patch-lib_utils.c
==============================================================================
--- head/net-mgmt/ccnet/files/patch-lib_utils.c	Thu Nov  6 19:19:31 2014	(r372230)
+++ head/net-mgmt/ccnet/files/patch-lib_utils.c	Thu Nov  6 19:32:44 2014	(r372231)
@@ -16,7 +16,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)
@@ -26,7 +26,7 @@
 +#if defined(__linux__)
      if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
 +#endif
-+#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
 +    if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
 +#endif
          return -1;
@@ -38,7 +38,7 @@
  
 +/*
 + * Finally, we should not enforce to use /proc
-+#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
 +gboolean process_is_running (const char *process_name)
 +{
 +    //TODO

Modified: head/net-mgmt/ccnet/files/patch-net_common_getgateway.c
==============================================================================
--- head/net-mgmt/ccnet/files/patch-net_common_getgateway.c	Thu Nov  6 19:19:31 2014	(r372230)
+++ head/net-mgmt/ccnet/files/patch-net_common_getgateway.c	Thu Nov  6 19:32:44 2014	(r372231)
@@ -5,7 +5,7 @@
  #endif
  
 -#ifdef BSD
-+#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
  #undef USE_PROC_NET_ROUTE
  #define USE_SOCKET_ROUTE
  #undef USE_SYSCTL_NET_ROUTE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411061932.sA6JWim6027531>