blob: 82d8b0c106c76ca85ca4a28e4ddd301605b8af78 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# Created by: alepulver
# $FreeBSD$
PORTNAME= tribler
PORTVERSION= 6.4.3
PORTREVISION= 2
CATEGORIES= net-p2p
MASTER_SITES= https://github.com/Tribler/tribler/releases/download/${PORTVERSION:S/^/v/}/
DISTFILES= ${PORTNAME}_${PORTVERSION}_all.deb
MAINTAINER= ports@FreeBSD.org
COMMENT= Streaming capable P2P network client based on BitTorrent
LICENSE= LGPL21 MIT
LICENSE_COMB= multi
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}apsw>0:${PORTSDIR}/databases/py-apsw \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
${PYTHON_PKGNAMEPREFIX}pyasn1>=0.1.7:${PORTSDIR}/devel/py-pyasn1 \
${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow \
${PYTHON_PKGNAMEPREFIX}gmpy>0:${PORTSDIR}/math/py-gmpy \
${PYTHON_PKGNAMEPREFIX}netifaces>0:${PORTSDIR}/net/py-netifaces \
${PYTHON_PKGNAMEPREFIX}libtorrent-rasterbar>=0.16.4:${PORTSDIR}/net-p2p/libtorrent-rasterbar-python \
${PYTHON_PKGNAMEPREFIX}m2crypto>0:${PORTSDIR}/security/py-m2crypto \
${PYTHON_PKGNAMEPREFIX}pycrypto>0:${PORTSDIR}/security/py-pycrypto \
${PYTHON_PKGNAMEPREFIX}feedparser>0:${PORTSDIR}/textproc/py-feedparser \
${PYTHON_PKGNAMEPREFIX}cherrypy>0:${PORTSDIR}/www/py-cherrypy \
${PYTHON_PKGNAMEPREFIX}requests>0:${PORTSDIR}/www/py-requests
NO_ARCH= yes
NO_BUILD= yes
NO_WRKSUBDIR= yes
USES= desktop-file-utils python:2 shebangfix twisted:run
SHEBANG_FILES= usr/share/tribler/Tribler/Core/DecentralizedTracking/pymdht/*.py \
usr/share/tribler/Tribler/Core/DecentralizedTracking/pymdht/*/*.py \
usr/share/tribler/Tribler/Debug/memory.py \
usr/share/tribler/Tribler/Main/*.py \
usr/share/tribler/Tribler/dispersy/*/*.py \
usr/share/tribler/Tribler/vlc.py
USE_OPENSSL= yes
USE_PYTHON= run
USE_WX= 2.8
WX_COMPS= python
CFLAGS+= -D__STDC_LIMIT_MACROS=1
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= DOCS VLC
OPTIONS_DEFAULT= VLC
VLC_DESC= Multimedia support via VLC
VLC_RUN_DEPENDS= ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
vlc:${PORTSDIR}/multimedia/vlc
TRIBLER_DIR= ${PYTHONPREFIX_SITELIBDIR}/tribler
post-extract:
@(cd ${WRKSRC} && ${TAR} -xf data.tar.xz)
post-patch:
@${REINPLACE_CMD} -e \
's|%%OPSYS%%|${OPSYS}| ; \
s|%%PYTHON_SITELIBDIR%%|${PYTHON_SITELIBDIR}| ; \
s|%%PYTHON_VERSION%%|${PYTHON_VERSION}|' \
${WRKSRC}/usr/bin/tribler
@${REINPLACE_CMD} -e \
's|Application;|| ; \
/^Categories/s|$$|;| ; \
/^MimeType/s|$$|;|' \
${WRKSRC}/usr/share/applications/tribler.desktop
@${REINPLACE_CMD} -i '' -e \
's|linux|${OPSYS:tl}|' \
${WRKSRC}/usr/share/tribler/Tribler/vlc.py
do-install:
(cd ${WRKSRC}/usr/bin && ${INSTALL_SCRIPT} tribler \
${STAGEDIR}${PREFIX}/bin)
@${MKDIR} ${STAGEDIR}${TRIBLER_DIR}/Tribler
@(${TAR} -C ${WRKSRC}/usr/share/tribler/Tribler \
--exclude "Build" \
--exclude "LGPL-2.1.txt" \
--exclude "SwiftEngine" \
--exclude "readme.txt" \
--exclude "*LICENSE*.txt" \
--exclude "*.orig" \
-cf - . | ${TAR} -C ${STAGEDIR}${TRIBLER_DIR}/Tribler -xf -)
@${FIND} ${STAGEDIR}${TRIBLER_DIR}/Tribler -type f -print0 | \
${XARGS} -0 ${CHMOD} ${SHAREMODE}
@${FIND} ${STAGEDIR}${TRIBLER_DIR}/Tribler -type d -print0 | \
${XARGS} -0 ${CHMOD} a+rx
@${MKDIR} ${STAGEDIR}${DESKTOPDIR}
(cd ${WRKSRC}/usr/share/applications && ${INSTALL_DATA} \
*.desktop ${STAGEDIR}${PREFIX}/share/applications)
(cd ${WRKSRC}/usr/share/pixmaps && ${INSTALL_DATA} \
*.xpm ${STAGEDIR}${PREFIX}/share/pixmaps)
@(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -m compileall \
-d ${PYTHONPREFIX_SITELIBDIR} \
-f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
@(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O -m compileall \
-d ${PYTHONPREFIX_SITELIBDIR} \
-f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/usr/share/tribler/Tribler && ${INSTALL_DATA} \
*LICENSE*.txt readme.txt ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>
|