diff --git a/GIDs b/GIDs index 109235222730..e8b883c007e7 100644 --- a/GIDs +++ b/GIDs @@ -253,7 +253,7 @@ netdata:*:302: # free: 311 _sphinx:*:312: _fastdfs:*:313: -# free: 314 +airdcpp:*:314: # free: 315 # free: 316 # free: 317 diff --git a/UIDs b/UIDs index 76d70a455da8..63740831bea0 100644 --- a/UIDs +++ b/UIDs @@ -258,7 +258,7 @@ netdata:*:302:302::0:0:NetData Daemon:/var/cache/netdata:/usr/sbin/nologin # free: 311 _sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin _fastdfs:*:313:313::0:0:FastDFS Owner:/nonexistent:/usr/sbin/nologin -# free: 314 +airdcpp:*:314:314::0:0:Airdc++ WebClient Daemon:/nonexistent:/usr/sbin/nologin # free: 315 # free: 316 # free: 317 diff --git a/net-p2p/airdcpp-webclient/Makefile b/net-p2p/airdcpp-webclient/Makefile new file mode 100644 index 000000000000..df65dd00d1a8 --- /dev/null +++ b/net-p2p/airdcpp-webclient/Makefile @@ -0,0 +1,69 @@ +# Created by: Venim +# $FreeBSD$ + +PORTNAME= airdcpp-webclient +DISTVERSION= 2.11.2 +CATEGORIES= net-p2p +MASTER_SITES= https://airdcpp-web.github.io/ + +MAINTAINER= ven1m@protonmail.com +COMMENT= Peer-to-peer file sharing application for file servers/NAS devices + +LICENSE= MIT + +BUILD_DEPENDS= npm>=1.54:www/npm \ + websocketpp>=0.7.0:devel/websocketpp +LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ + libboost_system.so:devel/boost-libs \ + libboost_thread.so:devel/boost-libs \ + libleveldb.so:databases/leveldb \ + libmaxminddb.so:net/libmaxminddb \ + libminiupnpc.so:net/miniupnpc +RUN_DEPENDS= npm>=1.54:www/npm + +USES= cmake compiler:c++11-lang iconv pkgconfig python ssl +USE_GITHUB= yes +GH_ACCOUNT= airdcpp-web +USE_LDCONFIG= yes +USE_RC_SUBR= airdcppd + +ALL_TARGET= all + +ETCDIR?= ${PREFIX}/etc/airdcpp +DATADIR?= ${PREFIX}/share/airdcpp + +_AIRDCPP_RUNDIR?= /var/run/airdcppd +_AIRDCPP_USER?= airdcpp +_AIRDCPP_GROUP?= airdcpp + +BINARY_ALIAS= python=${PYTHON_CMD} +SUB_FILES= dcppboot.xml pkg-message +SUB_LIST+= AIRDCPP_GROUP=${_AIRDCPP_GROUP} \ + AIRDCPP_RUNDIR=${_AIRDCPP_RUNDIR} \ + AIRDCPP_USER=${_AIRDCPP_USER} +PLIST_SUB= ${SUB_LIST} \ + DISTVERSION=${DISTVERSION} + +OPTIONS_DEFINE= NATPMP TBB +NATPMP_DESC= Optional NAT-PMP support +TBB_DESC= Optional Intel Threading Building Blocks (TBB) support + +NATPMP_LIB_DEPENDS= libnatpmp.so:net/libnatpmp +NATPMP_CONFIGURE_WITH= natpmp +TBB_LIB_DEPENDS= libtbb.so:devel/tbb +TBB_CONFIGURE_WITH= tbb + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/airdcppd \ + ${STAGEDIR}${PREFIX}/lib/libairdcpp.so.${DISTVERSION} \ + ${STAGEDIR}${PREFIX}/lib/libairdcpp-webapi.so.${DISTVERSION} + + ${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}${_AIRDCPP_RUNDIR} + + ${INSTALL_DATA} ${WRKDIR}/dcppboot.xml ${STAGEDIR}${ETCDIR}/dcppboot.xml.sample + + (cd ${STAGEDIR}${DATADIR}; ${FIND} . -type f) | ${SORT} | \ + ${SED} -e 's,^\.,${DATADIR_REL},' >> ${TMPPLIST} + +.include diff --git a/net-p2p/airdcpp-webclient/distinfo b/net-p2p/airdcpp-webclient/distinfo new file mode 100644 index 000000000000..ef60104d3674 --- /dev/null +++ b/net-p2p/airdcpp-webclient/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1632410897 +SHA256 (airdcpp-web-airdcpp-webclient-2.11.2_GH0.tar.gz) = a8b475193dd4ff3ca56311a3dc5f07759ef5d4394340e92b21dba0c700e967f2 +SIZE (airdcpp-web-airdcpp-webclient-2.11.2_GH0.tar.gz) = 978294 diff --git a/net-p2p/airdcpp-webclient/files/airdcppd.in b/net-p2p/airdcpp-webclient/files/airdcppd.in new file mode 100644 index 000000000000..e8ad1bbf5c84 --- /dev/null +++ b/net-p2p/airdcpp-webclient/files/airdcppd.in @@ -0,0 +1,32 @@ +#!/bin/sh + +# +# PROVIDE: airdcppd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# airdcppd_enable (bool): Set to NO by default. +# Set it to YES to enable airdcppd. + +. /etc/rc.subr + +name="airdcppd" +rcvar="${name}_enable" +load_rc_config "${name}" + +: ${airdcppd_enable:="NO"} +: ${airdcppd_user:="%%AIRDCPP_USER%%"} +: ${airdcppd_group:="%%AIRDCPP_GROUP%%"} +: ${airdcppd_umask:="0002"} + +command="%%PREFIX%%/bin/${name}" +pidfile="%%AIRDCPP_RUNDIR%%/${name}.pid" + +command_args="-d -p=${pidfile}" + +umask ${airdcppd_umask} +run_rc_command "$1" diff --git a/net-p2p/airdcpp-webclient/files/dcppboot.xml.in b/net-p2p/airdcpp-webclient/files/dcppboot.xml.in new file mode 100644 index 000000000000..e1517e73d01c --- /dev/null +++ b/net-p2p/airdcpp-webclient/files/dcppboot.xml.in @@ -0,0 +1,13 @@ + + + %%PREFIX%%/etc/airdcpp/ + diff --git a/net-p2p/airdcpp-webclient/files/patch-scripts_generate__version.sh b/net-p2p/airdcpp-webclient/files/patch-scripts_generate__version.sh new file mode 100644 index 000000000000..c75fd413391c --- /dev/null +++ b/net-p2p/airdcpp-webclient/files/patch-scripts_generate__version.sh @@ -0,0 +1,11 @@ +--- scripts/generate_version.sh.orig 2021-08-04 04:07:43 UTC ++++ scripts/generate_version.sh +@@ -12,7 +12,7 @@ versionDate=`date +%s` + commitCount=0 + + #check if we have a repository +-git ls-remote > /dev/null 2>&1 ++false + if [ $? -ne 0 ];then + echo '-- Not using a Git version' + elif [ `git rev-parse --abbrev-ref HEAD` != "master" ];then diff --git a/net-p2p/airdcpp-webclient/files/pkg-message.in b/net-p2p/airdcpp-webclient/files/pkg-message.in new file mode 100644 index 000000000000..c5d74675b1aa --- /dev/null +++ b/net-p2p/airdcpp-webclient/files/pkg-message.in @@ -0,0 +1,12 @@ +[ +{ type: install + message: <