aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/uhub
diff options
context:
space:
mode:
authorTong LIU <nemoliu@FreeBSD.org>2010-02-02 09:27:09 +0000
committerTong LIU <nemoliu@FreeBSD.org>2010-02-02 09:27:09 +0000
commit75dbf689f3ad5e84475551e6b63dc32e97af8af7 (patch)
tree2a519a56ef33a6278165115353fdca558f3dcaf4 /net-p2p/uhub
parent411913fdcac3e9768a5b8d4ae219f0ce9a2c760e (diff)
downloadports-75dbf689f3ad5e84475551e6b63dc32e97af8af7.tar.gz
ports-75dbf689f3ad5e84475551e6b63dc32e97af8af7.zip
- Update to to 0.3.0
PR: ports/143428 Submitted by: Dmitry Yashin <yashin.dm@gmail.com> (maintainer)
Notes
Notes: svn path=/head/; revision=249080
Diffstat (limited to 'net-p2p/uhub')
-rw-r--r--net-p2p/uhub/Makefile17
-rw-r--r--net-p2p/uhub/distinfo6
-rw-r--r--net-p2p/uhub/files/patch-GNUmakefile14
-rw-r--r--net-p2p/uhub/files/patch-main.c_add_pid91
-rw-r--r--net-p2p/uhub/pkg-descr2
5 files changed, 25 insertions, 105 deletions
diff --git a/net-p2p/uhub/Makefile b/net-p2p/uhub/Makefile
index a7139bba62cc..e69262fc4c9b 100644
--- a/net-p2p/uhub/Makefile
+++ b/net-p2p/uhub/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= uhub
-PORTVERSION= 0.2.8
+PORTVERSION= 0.3.0
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
@@ -14,8 +14,6 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= yashin.dm@gmail.com
COMMENT= High performance peer-to-peer hub for the ADC network
-LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent
-
USE_PERL5= yes
USE_GMAKE= yes
@@ -24,6 +22,17 @@ USE_RC_SUBR= uhub.sh
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE= ${WRKSRC}/GNUmakefile
+OPTIONS= OPENSSL "Enable SSL support (experimental)" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OPENSSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+MAKE_ARGS= USE_SSL=YES
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -L${OPENSSLLIB}
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/doc/uhub.conf
@@ -34,4 +43,4 @@ post-install:
${TOUCH} ${PREFIX}/etc/uhub/motd.txt.sample ; \
fi
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-p2p/uhub/distinfo b/net-p2p/uhub/distinfo
index 8dbc72979576..ac8d95967f6d 100644
--- a/net-p2p/uhub/distinfo
+++ b/net-p2p/uhub/distinfo
@@ -1,3 +1,3 @@
-MD5 (uhub-0.2.8-src.tar.gz) = 45d35d9757bc0a84297dec51520f725b
-SHA256 (uhub-0.2.8-src.tar.gz) = 4f205653a2c08b1a3e8dbd5ccee512c42d4b86825f2ee7cd21c53b5283256d2d
-SIZE (uhub-0.2.8-src.tar.gz) = 121873
+MD5 (uhub-0.3.0-src.tar.gz) = d112694a9323bb47a8f62606633a8cf2
+SHA256 (uhub-0.3.0-src.tar.gz) = 24db78bf2f6c0da144197c49a1b37b88cec9f6d991f735d6544686c9f536fef1
+SIZE (uhub-0.3.0-src.tar.gz) = 134379
diff --git a/net-p2p/uhub/files/patch-GNUmakefile b/net-p2p/uhub/files/patch-GNUmakefile
index 4dfcf84b69fb..2dfe51182591 100644
--- a/net-p2p/uhub/files/patch-GNUmakefile
+++ b/net-p2p/uhub/files/patch-GNUmakefile
@@ -1,7 +1,7 @@
---- GNUmakefile.orig 2009-03-24 02:21:38.000000000 +0300
-+++ GNUmakefile 2009-11-07 04:35:56.000000000 +0300
+--- GNUmakefile.orig 2010-01-25 01:38:25.000000000 +0300
++++ GNUmakefile 2010-02-01 12:12:34.000000000 +0300
@@ -3,7 +3,7 @@
- ## Copyright (C) 2007-2008, Jan Vidar Krey <janvidar@extatic.org>
+ ## Copyright (C) 2007-2010, Jan Vidar Krey <janvidar@extatic.org>
#
-CC = gcc
@@ -9,8 +9,8 @@
LD := $(CC)
MV := mv
RANLIB := ranlib
-@@ -31,10 +31,10 @@
- BIN_EXT ?= .exe
+@@ -36,11 +36,12 @@
+ GIT_REVISION ?= NO
else
DESTDIR ?= /
-UHUB_CONF_DIR ?= $(DESTDIR)/etc/uhub
@@ -22,9 +22,11 @@
+CFLAGS += -I$(LOCALBASE)/include
+LDFLAGS += -L$(LOCALBASE)/lib
BIN_EXT ?=
++GIT_REVISION ?= NO
endif
-@@ -252,7 +252,7 @@
+ ifeq ($(SILENT),YES)
+@@ -225,7 +226,7 @@
@if [ ! -d $(UHUB_CONF_DIR) ]; then echo Creating $(UHUB_CONF_DIR); mkdir -p $(UHUB_CONF_DIR); fi
@if [ ! -f $(UHUB_CONF_DIR)/uhub.conf ]; then cp doc/uhub.conf $(UHUB_CONF_DIR); fi
@if [ ! -f $(UHUB_CONF_DIR)/users.conf ]; then cp doc/users.conf $(UHUB_CONF_DIR); fi
diff --git a/net-p2p/uhub/files/patch-main.c_add_pid b/net-p2p/uhub/files/patch-main.c_add_pid
deleted file mode 100644
index 835256e4212a..000000000000
--- a/net-p2p/uhub/files/patch-main.c_add_pid
+++ /dev/null
@@ -1,91 +0,0 @@
---- src/main.c.orig 2009-11-06 11:02:57.000000000 +0300
-+++ src/main.c 2009-11-06 11:15:45.000000000 +0300
-@@ -29,6 +29,7 @@
- static const char* arg_gid = 0;
- static const char* arg_config = 0;
- static const char* arg_log = 0;
-+static const char* arg_pid = 0;
- static int arg_log_syslog = 0;
-
-
-@@ -214,6 +215,7 @@
- #ifndef WIN32
- " -u <user> Run as given user\n"
- " -g <group> Run with given group permissions\n"
-+ " -p <file> Store pid in file (process id)\n"
- #endif
- " -V Show version number.\n"
- );
-@@ -225,7 +227,7 @@
- void parse_command_line(int argc, char** argv)
- {
- int opt;
-- while ((opt = getopt(argc, argv, "vqfc:l:hu:g:VCsSL")) != -1)
-+ while ((opt = getopt(argc, argv, "vqfc:l:hu:g:VCsSLp:")) != -1)
- {
- switch (opt)
- {
-@@ -285,6 +287,10 @@
- arg_gid = optarg;
- break;
-
-+ case 'p':
-+ arg_pid = optarg;
-+ break;
-+
- default:
- print_usage(argv[0]);
- break;
-@@ -386,6 +392,32 @@
-
- return 0;
- }
-+
-+int pidfile_create()
-+{
-+ if (arg_pid)
-+ {
-+ FILE* pidfile = fopen(arg_pid, "w");
-+ if (!pidfile)
-+ {
-+ hub_log(log_fatal, "Unable to write pid file: %s\n", arg_pid);
-+ return -1;
-+ }
-+ fprintf(pidfile, "%d", (int) getpid());
-+ fclose(pidfile);
-+ }
-+ return 0;
-+}
-+
-+int pidfile_destroy()
-+{
-+ if (arg_pid)
-+ {
-+ return unlink(arg_pid);
-+ }
-+ return 0;
-+}
-+
- #endif /* WIN32 */
-
-
-@@ -421,11 +453,19 @@
- }
- }
-
-+ if (pidfile_create() == -1)
-+ return -1;
-+
- if (drop_privileges() == -1)
- return -1;
- #endif /* WIN32 */
-
- ret = main_loop();
-+
-+#ifndef WIN32
-+ pidfile_destroy();
-+#endif
-+
- return ret;
- }
-
diff --git a/net-p2p/uhub/pkg-descr b/net-p2p/uhub/pkg-descr
index 5ae0846969fb..1b40456ec432 100644
--- a/net-p2p/uhub/pkg-descr
+++ b/net-p2p/uhub/pkg-descr
@@ -2,4 +2,4 @@ uHub is a high performance peer-to-peer hub for the ADC network.
Its low memory footprint allows it to handle several thousand users
on high-end servers, or a small private hub on embedded hardware.
-WWW: http://www.extatic.org/uhub/
+WWW: http://www.uhub.org/