aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/tribler/Makefile
blob: a9b12ab4c3da8c2a5e57b7aa31d1109e114f52de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# New ports collection makefile for:    tribler
# Date created:             2007-04-10
# Whom:                 alepulver
#
# $FreeBSD$
#

PORTNAME=   tribler
PORTVERSION=    4.0.4
PORTREVISION=   1
CATEGORIES= net-p2p
MASTER_SITES=   SF
DISTNAME=   Tribler_${PORTVERSION}_src

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    Streaming capable P2P network client based on BitTorrent

RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/M2Crypto/__init__.py:${PORTSDIR}/security/py-m2crypto \
        ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py-bsddb

USE_ZIP=    yes
USE_PYTHON= 2.4+
USE_WX=     2.6+
WX_COMPS=   python
WX_UNICODE= yes

post-extract:
    @cd ${WRKSRC} && \
        ${RM} -rf *.bat *.exe.* *.nsi *.sh contrib-win32.txt \
            *LICENSE.txt debian mac *.command && \
        ${MV} protocol_v3.txt readme.txt tribler*.xpm ..

post-patch:
    @${REINPLACE_CMD} -i '' -e 's|/bin/netstat|netstat|' \
        ${WRKSRC}/Tribler/NATFirewall/guessip.py

do-build:
    @(${ECHO_CMD} "#!${SH}"; ${ECHO_CMD} "cd ${DATADIR} || exit 1"; \
      ${ECHO_CMD} 'exec ${PYTHON_CMD} ${PORTNAME}.py "$$@"') \
      > ${WRKDIR}/${PORTNAME}
    @${PYTHON_CMD} -Oc 'import compileall; \
        compileall.compile_dir("${WRKSRC}", force=1)'

do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    ${CP} -R ${WRKSRC}/* ${DATADIR}
    @${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE}
    @${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
    ${MKDIR} ${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${WRKDIR}/tribler*.xpm ${PREFIX}/share/pixmaps
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKDIR}/*.txt ${DOCSDIR}
.endif

.include <bsd.port.mk>