2003-04-05 07:56:44 +02:00
|
|
|
# New ports collection makefile for: BitTorrent
|
|
|
|
# Date created: Sun Mar 16 06:34:12 UTC 2003
|
|
|
|
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= BitTorrent
|
2006-02-01 03:57:00 +01:00
|
|
|
PORTVERSION= 4.4.0
|
2006-02-23 19:22:49 +01:00
|
|
|
PORTREVISION= 4
|
2004-03-14 19:36:06 +01:00
|
|
|
PORTEPOCH= 1
|
2006-01-30 22:36:28 +01:00
|
|
|
CATEGORIES?= net-p2p python
|
2006-03-31 06:12:56 +02:00
|
|
|
MASTER_SITES= http://download.bittorrent.com/dl/
|
2005-05-30 05:17:30 +02:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME:L}
|
2003-04-05 07:56:44 +02:00
|
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
2005-05-30 05:31:20 +02:00
|
|
|
PKGNAMESUFFIX?= -devel
|
2003-04-05 07:56:44 +02:00
|
|
|
|
|
|
|
MAINTAINER= lioux@FreeBSD.org
|
2003-10-22 23:27:49 +02:00
|
|
|
COMMENT?= A peer-to-peer tool for distributing files written in Python
|
2003-04-05 07:56:44 +02:00
|
|
|
|
2005-08-28 20:23:02 +02:00
|
|
|
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/dns/__init__.py:${PORTSDIR}/dns/py-dnspython \
|
|
|
|
${PYTHON_SITELIBDIR}/Crypto/__init__.py:${PORTSDIR}/security/py-pycrypto
|
2004-12-26 11:48:12 +01:00
|
|
|
|
2005-10-13 18:08:49 +02:00
|
|
|
USE_GETTEXT= yes
|
2003-04-05 07:56:44 +02:00
|
|
|
USE_PYTHON= yes
|
|
|
|
USE_PYDISTUTILS= yes
|
|
|
|
USE_REINPLACE= yes
|
2005-11-15 03:22:33 +01:00
|
|
|
USE_TWISTED_RUN= yes
|
2003-04-05 07:56:44 +02:00
|
|
|
|
2004-06-05 14:57:15 +02:00
|
|
|
CONFLICTS= py??-*[Bb]it[Tt]orrent* py??-*[Bb]it[Tt]ornado* btqueue*
|
2004-03-01 05:15:52 +01:00
|
|
|
|
2004-12-24 10:10:04 +01:00
|
|
|
NO_LATEST_LINK= yes
|
|
|
|
|
2005-05-30 05:17:30 +02:00
|
|
|
.ifndef(NOPORTDOCS)
|
2004-12-24 10:10:04 +01:00
|
|
|
PORTDOCS= \
|
|
|
|
LICENSE.txt \
|
|
|
|
README.txt \
|
2005-05-30 05:17:30 +02:00
|
|
|
TRACKERLESS.txt \
|
2004-12-24 10:10:04 +01:00
|
|
|
credits.txt \
|
2005-07-17 23:30:34 +02:00
|
|
|
credits-l10n.txt \
|
2004-12-24 10:10:04 +01:00
|
|
|
redirdonate.html
|
2005-05-30 05:17:30 +02:00
|
|
|
.else
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-noportdocs-setup.py
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
2004-12-24 10:10:04 +01:00
|
|
|
|
2005-05-30 05:17:30 +02:00
|
|
|
.if ${ARCH} != "i386"
|
|
|
|
WITHOUT_PSYCO= yes
|
|
|
|
.endif
|
2003-04-05 07:56:44 +02:00
|
|
|
|
|
|
|
# required for GUI
|
|
|
|
.ifndef(WITHOUT_GUI)
|
2005-01-08 21:28:03 +01:00
|
|
|
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/pygtk.py:${PORTSDIR}/x11-toolkits/py-gtk2
|
2003-04-05 07:56:44 +02:00
|
|
|
|
2004-04-08 17:12:44 +02:00
|
|
|
PLIST_FILES+= \
|
2005-10-16 12:30:46 +02:00
|
|
|
bin/bittorrent \
|
|
|
|
bin/maketorrent \
|
2005-05-30 05:17:30 +02:00
|
|
|
share/pixmaps/BitTorrent/bittorrent.ico \
|
2006-02-01 03:57:00 +01:00
|
|
|
share/pixmaps/BitTorrent/icons/default/abort.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/broken.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/finished.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/info.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/pause.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/paused.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/play.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/queued.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/remove.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/running.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-broken.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-natted.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-pre-natted.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-running.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-starting.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/status-stopped.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/default/trashcan.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/broken.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/finished.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/info.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/pause.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/paused.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/play.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/queued.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/remove.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/running.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-broken.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-natted.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-pre-natted.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-running.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-starting.png \
|
|
|
|
share/pixmaps/BitTorrent/icons/old/status-stopped.png \
|
2005-05-30 05:17:30 +02:00
|
|
|
share/pixmaps/BitTorrent/logo/bittorrent_32.png \
|
2006-02-01 03:57:00 +01:00
|
|
|
share/pixmaps/BitTorrent/logo/bittorrent_96.png
|
2005-05-30 05:17:30 +02:00
|
|
|
|
2006-02-23 02:07:17 +01:00
|
|
|
PLIST_SUB+= \
|
|
|
|
GUI=""
|
2003-04-05 07:56:44 +02:00
|
|
|
.else
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-nogui-patch-setup.py
|
2006-02-23 02:07:17 +01:00
|
|
|
|
|
|
|
PLIST_SUB+= \
|
|
|
|
GUI="@comment "
|
2005-05-30 05:17:30 +02:00
|
|
|
.endif
|
|
|
|
# required for PSYCO
|
|
|
|
.ifndef(WITHOUT_PSYCO)
|
|
|
|
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psyco/_psyco.so:${PORTSDIR}/devel/py-psyco
|
|
|
|
|
2005-10-12 14:28:54 +02:00
|
|
|
EXTRA_PATCHES+= \
|
2005-08-28 20:23:02 +02:00
|
|
|
${FILESDIR}/extra-psyco-patch-bittorrent-console.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-bittorrent-curses.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-bittorrent-tracker.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-bittorrent.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-changetracker-console.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-launchmany-console.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-launchmany-curses.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-maketorrent-console.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-maketorrent.py \
|
|
|
|
${FILESDIR}/extra-psyco-patch-torrentinfo-console.py
|
2003-04-05 07:56:44 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
.ifndef(WITHOUT_GUI)
|
|
|
|
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
|
|
|
|
.endif
|
2005-05-30 05:17:30 +02:00
|
|
|
.ifndef(WITHOUT_PSYCO)
|
|
|
|
@${ECHO_MSG} '===> Define WITHOUT_PSYCO to disable devel/py-psyco optimization'
|
|
|
|
.endif
|
2003-04-05 07:56:44 +02:00
|
|
|
|
2005-11-21 03:29:09 +01:00
|
|
|
pre-patch:
|
|
|
|
# do not install public.key, we will do it ourselves
|
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e "s|^.*'public.key'.*$$||" \
|
|
|
|
${WRKSRC}/setup.py
|
|
|
|
|
2003-04-05 07:56:44 +02:00
|
|
|
post-patch:
|
2005-11-21 03:29:09 +01:00
|
|
|
# public.key will be located under ${DATADIR} not ${DOCSDIR}
|
|
|
|
@${REINPLACE_CMD} -E \
|
|
|
|
-e "s|%%DATADIR%%|'${DATADIR}/'|" \
|
|
|
|
${WRKSRC}/BitTorrent/NewVersion.py
|
2003-04-05 07:56:44 +02:00
|
|
|
|
|
|
|
post-install:
|
2004-12-24 10:10:04 +01:00
|
|
|
# set proper permissions
|
|
|
|
@${CHMOD} -R ${SHAREMODE} \
|
|
|
|
${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent
|
|
|
|
@${CHMOD} ${SHAREMODE} ${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent
|
|
|
|
@${CHMOD} a+x ${PREFIX}/${PYTHON_SITELIBDIR:S|^${PYTHONBASE}/||}/BitTorrent
|
2005-05-30 05:17:30 +02:00
|
|
|
.ifndef(WITHOUT_GUI)
|
|
|
|
# pixmaps
|
|
|
|
@${CHMOD} -R ${SHAREMODE} \
|
|
|
|
${PREFIX}/share/pixmaps/${PORTNAME}/*
|
2006-02-02 01:10:49 +01:00
|
|
|
@${CHMOD} -R a+X \
|
|
|
|
${PREFIX}/share/pixmaps/${PORTNAME}
|
2005-05-30 05:17:30 +02:00
|
|
|
.endif
|
2005-11-21 03:29:09 +01:00
|
|
|
.ifndef(NOPORTDOCS)
|
2005-05-30 05:17:30 +02:00
|
|
|
# docs
|
|
|
|
@${CHMOD} -R ${SHAREMODE} \
|
|
|
|
${DOCSDIR}/*
|
2005-11-21 03:29:09 +01:00
|
|
|
.endif
|
|
|
|
# public.key
|
|
|
|
@${MKDIR} ${DATADIR}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/public.key ${DATADIR}
|
2003-04-05 07:56:44 +02:00
|
|
|
|
2005-05-30 05:17:30 +02:00
|
|
|
.include <bsd.port.post.mk>
|