diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-02-24 05:18:33 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-02-24 05:18:33 +0000 |
commit | 17bda9431625ae0d71ecfb6ea89747bb8a035eb1 (patch) | |
tree | 5db9375daa61b02595dca0d5ed0f9ef9991c5d16 /net-p2p | |
parent | d77ab73e1c11fdd7b673558f1c02583834e4b78d (diff) | |
download | ports-17bda9431625ae0d71ecfb6ea89747bb8a035eb1.tar.gz ports-17bda9431625ae0d71ecfb6ea89747bb8a035eb1.zip |
Notes
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/linux-edonkey-server/Makefile | 61 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/distinfo | 1 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/files/donkey.ini | 19 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/files/edonkey2000-server.sh.sample | 44 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/pkg-comment | 1 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/pkg-descr | 20 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/pkg-install | 60 | ||||
-rw-r--r-- | net-p2p/linux-edonkey-server/pkg-plist | 5 |
8 files changed, 211 insertions, 0 deletions
diff --git a/net-p2p/linux-edonkey-server/Makefile b/net-p2p/linux-edonkey-server/Makefile new file mode 100644 index 000000000000..a5fb41860a7d --- /dev/null +++ b/net-p2p/linux-edonkey-server/Makefile @@ -0,0 +1,61 @@ +# New ports collection makefile for: Linux eDonkey server +# Date created: 18 December 2001 +# Whom: Yen-Ming Lee <leeym@leeym.com> & Mario S F Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= edonkey +PORTVERSION= 16.38 +CATEGORIES= net linux +MASTER_SITES= http://www.edonkey2000.com/files/ +PKGNAMEPREFIX= linux- +PKGNAMESUFFIX= -server +DISTNAME= dserver +EXTRACT_SUFX= .gz +EXTRACT_ONLY= + +MAINTAINER= lioux@FreeBSD.org + +ONLY_FOR_ARCHS= i386 +USE_LINUX= yes +NO_WRKSUBDIR= yes +NO_BUILD= yes +STRIP= +# +PKGDEINSTALL= ${PKGINSTALL} + +STRIP_CMD= ${LINUXBASE}/usr/bin/strip + +.if exists(/usr/bin/brandelf) +BRANDELF?= /usr/bin/brandelf +.else +BRANDELF?= brandelf +.endif + +BINARY_NAME= dserver +RC_SAMPLE= edonkey2000-server.sh.sample + +post-extract: + @${GZCAT} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} > ${WRKSRC}/${BINARY_NAME} + +post-patch: + @${SED} -e "s|%%PREFIX%%|${PREFIX}|" \ + -e "s|%%LOCALBASE%%|${LOCALBASE}|" ${FILESDIR}/${RC_SAMPLE} \ + > ${WRKDIR}/${RC_SAMPLE} + +pre-install: +.if exists(${STRIP_CMD}) + @${STRIP_CMD} ${WRKSRC}/${BINARY_NAME} +.endif + @${BRANDELF} -t Linux ${WRKSRC}/${BINARY_NAME} + +do-install: +# pre-install work: create user ids, ... + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @${INSTALL_PROGRAM} ${WRKDIR}/${BINARY_NAME} ${PREFIX}/sbin + @${INSTALL_SCRIPT} ${WRKSRC}/${RC_SAMPLE} ${PREFIX}/etc/rc.d + @${INSTALL_DATA} ${FILESDIR}/donkey.ini ${PREFIX}/etc/edonkey2000 + +.include <bsd.port.mk> diff --git a/net-p2p/linux-edonkey-server/distinfo b/net-p2p/linux-edonkey-server/distinfo new file mode 100644 index 000000000000..bc65b76328d4 --- /dev/null +++ b/net-p2p/linux-edonkey-server/distinfo @@ -0,0 +1 @@ +MD5 (dserver.gz) = 9fc668b8c223da3c7fa6619ae208ae7d diff --git a/net-p2p/linux-edonkey-server/files/donkey.ini b/net-p2p/linux-edonkey-server/files/donkey.ini new file mode 100644 index 000000000000..c268f163becb --- /dev/null +++ b/net-p2p/linux-edonkey-server/files/donkey.ini @@ -0,0 +1,19 @@ +[server] +name=UNKNOWN(Amnesiac) +desc=Change both name and description to real values +maxClients=6000 +public=true +console=false +logFile= +verbose=false +welcome[0]=This is my server built from FreeBSD ports collection. +welcome[1]=Check www.edonkey2000.com for updates. +threads=5 +thisIP= +port=4661 +seedIP= +seedPort=4661 +type=key +tableSize=2333 +maxVersion=1000 +minVersion=39 diff --git a/net-p2p/linux-edonkey-server/files/edonkey2000-server.sh.sample b/net-p2p/linux-edonkey-server/files/edonkey2000-server.sh.sample new file mode 100644 index 000000000000..8f38866566f1 --- /dev/null +++ b/net-p2p/linux-edonkey-server/files/edonkey2000-server.sh.sample @@ -0,0 +1,44 @@ +#!/bin/sh + +ETC_DIR=%%PREFIX%%/etc/edonkey2000 +SBIN_DIR=%%PREFIX%%/sbin +PATH=/bin:/usr/bin:%%LOCALBASE%%/bin +# +SU=/usr/bin/su +# +USER=edonkey2000 + +CONSOLE=`grep ^console= ${ETC_DIR}/donkey.ini | grep -i true | wc -l` + +if [ ${CONSOLE} -gt 0 -a ! -x %%LOCALBASE%%/bin/screen ]; then + echo "Please install ports misc/screen first to enable edonkey2000-server console" >&2 + exit +fi + +case "${1}" in +start) + if [ -x ${SBIN_DIR}/dserver ]; then + cd ${ETC_DIR} + if [ ${CONSOLE} -gt 0 ]; then + ${SU} ${USER} -c "screen -dmS ${SBIN_DIR}/dserver dserver" & + else + ${SU} ${USER} -c "${SBIN_DIR}/dserver >/dev/null 2>&1" & + fi + echo -n ' edonkey2000-server' + fi + ;; +stop) + killall -1 dserver > /dev/null 2>&1 + echo -n ' edonkey2000-server' + ;; +console) + if [ ${CONSOLE} -gt 0 ]; then + ${SU} edonkey2000 -c "screen -d -r dserver" + else + echo "Please set console=true in ${ETC_DIR}/donkey.ini, install ports misc/screen, then restart dserver" + fi + ;; +*) + echo "Usage: `basename $0` {start|stop|console}" >&2 + ;; +esac diff --git a/net-p2p/linux-edonkey-server/pkg-comment b/net-p2p/linux-edonkey-server/pkg-comment new file mode 100644 index 000000000000..28411b465ff8 --- /dev/null +++ b/net-p2p/linux-edonkey-server/pkg-comment @@ -0,0 +1 @@ +A decentralized peer-to-peer file-sharing server (eDonkey2000 server) diff --git a/net-p2p/linux-edonkey-server/pkg-descr b/net-p2p/linux-edonkey-server/pkg-descr new file mode 100644 index 000000000000..6c7e7ca61142 --- /dev/null +++ b/net-p2p/linux-edonkey-server/pkg-descr @@ -0,0 +1,20 @@ +eDonkey2000 doesn't rely on one central server yet searches are +quick and your client doesn't get bogged down with endless search +requests. You have the ability to search all the files being shared +anywhere on the eDonkey2000 network. + +It allows you to transfer any type of file. It automatically resumes +interrupted transfers from alternate sources. It even introduces +ways to share a whole collection of files together so you can be +sure to get all the songs in an album or all pieces of a movie. +Users will be able to download a file from multiple sources at the +same time thus insuring that transfers will be as fast as possible. + +Files can be uploaded while being downloaded. This insures that a +rare file that is wanted by many people will be distributed as +quickly as possible. + +The server and client are both distributed for free. There are Linux +and Windows versions available with Mac versions coming soon. + +WWW: http://www.edonkey2000.com/ diff --git a/net-p2p/linux-edonkey-server/pkg-install b/net-p2p/linux-edonkey-server/pkg-install new file mode 100644 index 000000000000..97f8a7cecee9 --- /dev/null +++ b/net-p2p/linux-edonkey-server/pkg-install @@ -0,0 +1,60 @@ +#!/bin/sh +# $FreeBSD$ + +# based on original from apache13 port + +[ $# != 2 ] && exit 1 +PKGNAME=$1 +ACTION=$2 + +USER=edonkey2000 +GROUP=${USER} + +ECHO=echo +INSTALL=/usr/bin/install +PW=/usr/sbin/pw + +case "$ACTION" in + +PRE-INSTALL) + if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + if ${PW} groupadd ${GROUP}; then + ${ECHO} "Added group \"${GROUP}\"." + else + ${ECHO} "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + if ${PW} useradd ${USER} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "& Server Owner"; \ + then + ${ECHO} "Added user \"${USER}\"." + else + ${ECHO} "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + ${INSTALL} -d -g ${GROUP} -m 1570 ${PKG_PREFIX}/etc/edonkey2000 + ;; + +DEINSTALL) + if ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + ${ECHO} "To delete eDonkey user permanently, use '${PW} userdel ${USER}'" + fi + if ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + ${ECHO} "To delete eDonkey group permanently, use '${PW} groupdel ${GROUP}'" + fi + exit 0 + ;; + +POST-INSTALL|POST-DEINSTALL) + ;; + +*) + exit 1 + ;; +esac + +exit diff --git a/net-p2p/linux-edonkey-server/pkg-plist b/net-p2p/linux-edonkey-server/pkg-plist new file mode 100644 index 000000000000..086a4ea589be --- /dev/null +++ b/net-p2p/linux-edonkey-server/pkg-plist @@ -0,0 +1,5 @@ +etc/edonkey2000/donkey.ini +etc/rc.d/edonkey2000-server.sh.sample +sbin/dserver +@unexec [ -r %D/etc/rc.d/edonkey2000-server.sh ] 2>/dev/null && echo "Do not forget to remove rc script ${PKG_PREFIX}/etc/rc.d/edonkey2000-server.sh. Deinstalling the port does not remove this file." | fmt || true +@unexec rmdir %D/etc/edonkey2000 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/etc/edonkey2000`` to remove any configuration files and logs left." | fmt |