Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2020 10:51:59 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r528226 - in head/net-p2p: . udpt udpt/files
Message-ID:  <202003111051.02BApxf7054140@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Wed Mar 11 10:51:58 2020
New Revision: 528226
URL: https://svnweb.freebsd.org/changeset/ports/528226

Log:
  UDPT is a lightweight UDP torrent tracker for Unix-like systems.
  
  WWW: https://github.com/troydm/udpt

Added:
  head/net-p2p/udpt/
  head/net-p2p/udpt/Makefile   (contents, props changed)
  head/net-p2p/udpt/distinfo   (contents, props changed)
  head/net-p2p/udpt/files/
  head/net-p2p/udpt/files/patch-Makefile   (contents, props changed)
  head/net-p2p/udpt/files/patch-src_http_httpserver.cpp   (contents, props changed)
  head/net-p2p/udpt/files/patch-src_multiplatform.h   (contents, props changed)
  head/net-p2p/udpt/files/patch-src_udpTracker.cpp   (contents, props changed)
  head/net-p2p/udpt/pkg-descr   (contents, props changed)
Modified:
  head/net-p2p/Makefile

Modified: head/net-p2p/Makefile
==============================================================================
--- head/net-p2p/Makefile	Wed Mar 11 10:44:16 2020	(r528225)
+++ head/net-p2p/Makefile	Wed Mar 11 10:51:58 2020	(r528226)
@@ -93,6 +93,7 @@
     SUBDIR += transmission-gtk
     SUBDIR += transmission-qt
     SUBDIR += transmission-remote-gui
+    SUBDIR += udpt
     SUBDIR += uhub
     SUBDIR += vuze
     SUBDIR += xmrig

Added: head/net-p2p/udpt/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/Makefile	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,40 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	udpt
+DISTVERSION=	g20200202
+CATEGORIES=	net-p2p
+
+MAINTAINER=	danfe@FreeBSD.org
+COMMENT=	Lightweight UDP torrent tracker
+
+LICENSE=	GPLv3+
+
+USES=		gmake localbase:ldflags sqlite:3
+USE_GITHUB=	yes
+GH_ACCOUNT=	troydm
+GH_TAGNAME=	6a7bf22
+
+CXXFLAGS+=	-Dlinux		# easier than patch a dozen places
+
+PLIST_FILES=	bin/${PORTNAME}
+PORTDOCS=	README.md
+
+OPTIONS_DEFINE=	DOCS
+
+post-patch:
+	@${REINPLACE_CMD} -e '/VERSION/ { s,beta,&-g${GH_TAGNAME},; \
+		s,Linux,${OPSYS},; }' ${WRKSRC}/src/multiplatform.h
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
+
+# Alternative to DOS2UNIX_FILES that preserves original timestamps,
+# to be used together with `-l' switch added to PATCH_ARGS below.
+fixpatches:
+	@${FIND} ${FILESDIR} -name patch-* | ${XARGS} ${SED} -i '' \
+		-E 's,[[:cntrl:]]*$$,,'
+PATCH_ARGS+=	-l

Added: head/net-p2p/udpt/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/distinfo	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1580668445
+SHA256 (troydm-udpt-g20200202-6a7bf22_GH0.tar.gz) = d1ae1c857b44461c595b8a046134aa586b881fcb102fa129db57158666c955a7
+SIZE (troydm-udpt-g20200202-6a7bf22_GH0.tar.gz) = 38677

Added: head/net-p2p/udpt/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/files/patch-Makefile	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,18 @@
+--- Makefile.orig	2020-02-02 18:34:05 UTC
++++ Makefile
+@@ -33,7 +33,7 @@ all: $(target)
+ 
+ $(target): $(objects)
+ 	@echo Linking...
+-	$(CXX) $(LDFLAGS) -O3 -o $(target) $(objects) -lsqlite3 -lpthread
++	$(CXX) $(LDFLAGS) -o $(target) $(objects) -lsqlite3 -lpthread
+ 	@echo Done.
+ clean:
+ 	@echo Cleaning Up...
+@@ -41,4 +41,5 @@ clean:
+ 	@echo Done.
+ 
+ install: $(target)
+-	@echo Installing $(target) to '$(exec_prefix)/bin'...
++	@echo Installing $(target) to '$(PREFIX)/bin'...
++	$(BSD_INSTALL_PROGRAM) $(target) $(DESTDIR)$(PREFIX)/bin

Added: head/net-p2p/udpt/files/patch-src_http_httpserver.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/files/patch-src_http_httpserver.cpp	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,11 @@
+--- src/http/httpserver.cpp.orig	2020-02-02 18:34:05 UTC
++++ src/http/httpserver.cpp
+@@ -52,7 +52,7 @@ namespace UDPT
+ 			sa.sin_family = AF_INET;
+ 			sa.sin_port = htons (port);
+ 
+-			r = bind (this->srv, (SOCKADDR*)&sa, sizeof(sa));
++			r = ::bind (this->srv, (SOCKADDR*)&sa, sizeof(sa));
+ 			if (r == SOCKET_ERROR)
+ 			{
+ 				throw ServerException (2, "Failed to bind socket");

Added: head/net-p2p/udpt/files/patch-src_multiplatform.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/files/patch-src_multiplatform.h	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,10 @@
+--- src/multiplatform.h.orig	2020-02-02 18:34:05 UTC
++++ src/multiplatform.h
+@@ -33,6 +33,7 @@
+ #elif defined (linux)
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <arpa/inet.h>
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <unistd.h>

Added: head/net-p2p/udpt/files/patch-src_udpTracker.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/files/patch-src_udpTracker.cpp	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,20 @@
+--- src/udpTracker.cpp.orig	2020-02-02 18:34:05 UTC
++++ src/udpTracker.cpp
+@@ -169,7 +169,7 @@ namespace UDPT
+ 		yup = 1;
+ 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*)&yup, 1);
+ 
+-		r = bind (sock, (SOCKADDR*)&recvAddr, sizeof(SOCKADDR_IN));
++		r = ::bind (sock, (SOCKADDR*)&recvAddr, sizeof(SOCKADDR_IN));
+ 
+ 		if (r == SOCKET_ERROR)
+ 		{
+@@ -521,7 +521,7 @@ static int _isIANA_IP (uint32_t ip)
+ 			}
+ 		}
+ 
+-		cout << ":: " << (void*)m_hton32(remote->sin_addr.s_addr) << ": " << m_hton16(remote->sin_port) << " ACTION=" << action << endl;
++		cout << ":: " << _ip_to_str(m_hton32(remote->sin_addr.s_addr)) << ":" << m_hton16(remote->sin_port) << " ACTION=" << action << endl;
+ 
+ 		if (action == 0 && r >= 16)
+ 			return UDPTracker::handleConnection (usi, remote, data);

Added: head/net-p2p/udpt/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/udpt/pkg-descr	Wed Mar 11 10:51:58 2020	(r528226)
@@ -0,0 +1,7 @@
+UDPT is a lightweight UDP torrent tracker for Unix-like systems.
+
+The main difference of this version of UDPT to an original is the
+ability to run this torrent tracker inside a local network and act
+as both local and remote network torrent tracker/announcer.
+
+WWW: https://github.com/troydm/udpt



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