Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2003 12:09:59 GMT
From:      Andre Luiz dos Santos <andre@netvision.com.br>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/48947: New port: BitTorrent, program for distributing/downloading .torrent files
Message-ID:  <200303051209.h25C9xjv011264@nv12.netvision.com.br>

next in thread | raw e-mail | index | archive | help

>Number:         48947
>Category:       ports
>Synopsis:       New port: BitTorrent, program for distributing/downloading .torrent files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 05 08:10:10 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andre Luiz dos Santos <andre@netvision.com.br>
>Release:        FreeBSD 5.0-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD nv12.netvision.com.br 5.0-RELEASE-p1 FreeBSD 5.0-RELEASE-p1 #0: Fri Feb 14 21:02:27 GMT 2003 root@:/usr/src/sys/i386/compile/NV i386

>Description:
	This port includes all the necessary programs for distributing
	files over BitTorrent and for downloading .torrent files.
>How-To-Repeat:
	
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	bittorrent
#	bittorrent/files
#	bittorrent/files/patch-aa
#	bittorrent/Makefile
#	bittorrent/pkg-plist
#	bittorrent/distinfo
#	bittorrent/pkg-descr
#	bittorrent/pkg-message
#
echo c - bittorrent
mkdir -p bittorrent > /dev/null 2>&1
echo c - bittorrent/files
mkdir -p bittorrent/files > /dev/null 2>&1
echo x - bittorrent/files/patch-aa
sed 's/^X//' >bittorrent/files/patch-aa << 'END-of-bittorrent/files/patch-aa'
X--- btdownloadcurses.py.orig	Sat Jan 25 11:18:37 2003
X+++ btdownloadcurses.py	Sat Jan 25 11:54:28 2003
X@@ -6,7 +6,7 @@
X from BitTorrent.download import download
X from threading import Event
X from os.path import abspath
X-from sys import argv, version, stdout
X+from sys import argv, version, stdout, exit
X assert version >= '2', "Install Python 2.0 or greater"
X 
X def fmttime(n):
X@@ -110,9 +110,23 @@
X         self.downloadTo = abspath(saveas)
X         return saveas
X 
X+def stdoutErrFunc(errormsg):
X+    curses.nocbreak()
X+    curses.echo()
X+    curses.endwin()
X+    print '\n\n\n\n'
X+    print errormsg
X+    exit(0)
X+
X def run(params):
X     d = CursesDisplayer()
X-    download(params, d.chooseFile, d.display, d.finished, d.error, Event(), fieldw)
X+    errFunc = d.error
X+    if len(params) == 0:
X+        errFunc = stdoutErrFunc
X+        fw = curses.COLS
X+    else:
X+        fw = fieldw
X+    download(params, d.chooseFile, d.display, d.finished, errFunc, Event(), fw)
X     if not d.done:
X         d.failed()
X 
END-of-bittorrent/files/patch-aa
echo x - bittorrent/Makefile
sed 's/^X//' >bittorrent/Makefile << 'END-of-bittorrent/Makefile'
X# Ports collection makefile for:	bittorrent
X# Date created:				23 January 2003
X# Whom:					Andre Luiz dos Santos
X#
X# $FreeBSD$
X#
X
XPORTNAME=	BitTorrent
XPORTVERSION=	3.1
XCATEGORIES=	net python
XMASTER_SITES=	http://bitconjurer.org/BitTorrent/ \
X		http://thiago.joi.com.br/andre/
X
XMAINTAINER=	andre@netvision.com.br
XCOMMENT=	BitTorrent is a tool for distributing files
X
XUSE_PYTHON=	yes
XUSE_REINPLACE=	yes
XNO_BUILD=	yes
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
XPYFILES=	btdownloadcurses.py btdownloadgui.py btdownloadheadless.py \
X		btdownloadprefetched.py btmakemetafile.py bttrack.py
XDOCFILES=	FAQ.txt README.txt credits.txt todo.txt INSTALL.unix.txt LICENSE.txt
X
Xpost-patch:
X.for f in ${PYFILES}
X	@${REINPLACE_CMD} -e "1s:.*:#!${PYTHON_CMD}:" ${WRKSRC}/$f
X.endfor
X
Xdo-install:
X	${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/BitTorrent
X	${INSTALL_SCRIPT} ${WRKSRC}/BitTorrent/*.py ${PYTHONPREFIX_SITELIBDIR}/BitTorrent
X	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${PYTHONPREFIX_SITELIBDIR}/BitTorrent
X.for f in ${PYFILES}
X	${INSTALL_SCRIPT} ${WRKSRC}/$f ${PREFIX}/bin/
X	${LN} -fs $f ${PREFIX}/bin/${f:S/.py//}
X.endfor
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for f in ${DOCFILES}
X	${INSTALL_MAN} ${WRKSRC}/$f ${DOCSDIR}
X.endfor
X.endif
X
Xpost-install:
X	@${SED} -e "s:%%DOCSDIR%%:${DOCSDIR}:g" pkg-message >${PKGMESSAGE}
X.if !defined(BATCH)
X	@${ECHO}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO}
X.endif
X
X.include <bsd.port.mk>
END-of-bittorrent/Makefile
echo x - bittorrent/pkg-plist
sed 's/^X//' >bittorrent/pkg-plist << 'END-of-bittorrent/pkg-plist'
Xbin/btdownloadcurses.py
Xbin/btdownloadcurses
Xbin/btdownloadgui.py
Xbin/btdownloadgui
Xbin/btdownloadheadless.py
Xbin/btdownloadheadless
Xbin/btdownloadprefetched.py
Xbin/btdownloadprefetched
Xbin/btmakemetafile.py
Xbin/btmakemetafile
Xbin/bttrack.py
Xbin/bttrack
X%%PYTHON_SITELIBDIR%%/BitTorrent/Choker.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Choker.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Connecter.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Connecter.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/CurrentRateMeasure.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/CurrentRateMeasure.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Downloader.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Downloader.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/DownloaderFeedback.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/DownloaderFeedback.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Encrypter.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Encrypter.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/EndgameDownloader.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/EndgameDownloader.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/HTTPHandler.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/HTTPHandler.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/NatCheck.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/NatCheck.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/PiecePicker.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/PiecePicker.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/RateMeasure.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/RateMeasure.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/RawServer.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/RawServer.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Rerequester.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Rerequester.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Storage.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Storage.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/StorageWrapper.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/StorageWrapper.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/Uploader.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/Uploader.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/__init__.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/__init__.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/bencode.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/bencode.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/bitfield.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/bitfield.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/btformats.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/btformats.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/download.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/download.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/fakeopen.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/fakeopen.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/parseargs.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/parseargs.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/selectpoll.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/selectpoll.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/testtest.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/testtest.pyc
X%%PYTHON_SITELIBDIR%%/BitTorrent/track.py
X%%PYTHON_SITELIBDIR%%/BitTorrent/track.pyc
X%%PORTDOCS%%share/doc/BitTorrent/FAQ.txt
X%%PORTDOCS%%share/doc/BitTorrent/README.txt
X%%PORTDOCS%%share/doc/BitTorrent/credits.txt
X%%PORTDOCS%%share/doc/BitTorrent/todo.txt
X%%PORTDOCS%%share/doc/BitTorrent/INSTALL.unix.txt
X%%PORTDOCS%%share/doc/BitTorrent/LICENSE.txt
X@dirrm %%PYTHON_SITELIBDIR%%/BitTorrent
X%%PORTDOCS%%@dirrm share/doc/BitTorrent
END-of-bittorrent/pkg-plist
echo x - bittorrent/distinfo
sed 's/^X//' >bittorrent/distinfo << 'END-of-bittorrent/distinfo'
XMD5 (BitTorrent-3.1.tar.gz) = 94842dd09e435ee1a1a504857568b782
END-of-bittorrent/distinfo
echo x - bittorrent/pkg-descr
sed 's/^X//' >bittorrent/pkg-descr << 'END-of-bittorrent/pkg-descr'
XBitTorrent is a tool for distributing files.
XWhenever more than one person is downloading at once
Xthey send pieces of the file(s) to each other, thus relieving
Xthe central server's bandwidth burden. Even with many
Xsimultaneous downloads, the upload burden on the central server
Xremains quite small, since each new downloader introduces new
Xupload capacity.
X
XWWW: http://bitconjurer.org/BitTorrent/
END-of-bittorrent/pkg-descr
echo x - bittorrent/pkg-message
sed 's/^X//' >bittorrent/pkg-message << 'END-of-bittorrent/pkg-message'
XThe documentation is available at %%DOCSDIR%%.
X
XIf you want to use the GUI, you'll have to install py-wxPython,
Xthe following commands should do it:
X
X# cd /usr/ports/x11-toolkits/py-wxPython
X# make install
END-of-bittorrent/pkg-message
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




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