1 |
laffer1 |
15053 |
# $MidnightBSD$ |
2 |
|
|
|
3 |
|
|
PORTNAME= transmission |
4 |
|
|
PORTVERSION= 2.80 |
5 |
|
|
PORTREVISION?= 0 |
6 |
|
|
CATEGORIES?= net-p2p |
7 |
|
|
#MASTER_SITES= http://download.m0k.org/${PORTNAME}/files/ |
8 |
|
|
MASTER_SITES= http://transmission.cachefly.net/ |
9 |
|
|
PKGNAMESUFFIX?= -cli |
10 |
|
|
|
11 |
|
|
MAINTAINER?= ports@MidnightBSD.org |
12 |
|
|
COMMENT?= Lightweight CLI (command line) BitTorrent client and utilities |
13 |
|
|
|
14 |
|
|
SLAVEPORT?= cli |
15 |
|
|
|
16 |
|
|
# Odd arrangement here-- cli is MIT, everything else is GPL |
17 |
|
|
.if ${SLAVEPORT} == cli |
18 |
|
|
LICENSE= mit |
19 |
|
|
.else |
20 |
|
|
LICENSE= gpl2 |
21 |
|
|
.endif |
22 |
|
|
|
23 |
|
|
CONFLICTS_INSTALL= ${PORTNAME}${PKGNAMESUFFIX}-2.5* |
24 |
|
|
|
25 |
|
|
OPTIONS_DEFINE= LITE |
26 |
|
|
|
27 |
|
|
.include <bsd.mport.options.mk> |
28 |
|
|
|
29 |
|
|
.if ${SLAVEPORT} != web |
30 |
|
|
LIB_DEPENDS?= ${GEN_LIB_DEPENDS} |
31 |
|
|
|
32 |
|
|
# General dependencies |
33 |
|
|
GEN_LIB_DEPENDS=curl:${PORTSDIR}/ftp/curl \ |
34 |
|
|
event-2.0.6:${PORTSDIR}/devel/libevent2 |
35 |
|
|
GEN_RUN_DEPENDS=${LOCALBASE}/share/transmission/web/index.html:${PORTSDIR}/www/transmission-web |
36 |
|
|
|
37 |
|
|
USE_GMAKE= yes |
38 |
|
|
USES= pkgconfig |
39 |
|
|
USE_OPENSSL= yes |
40 |
|
|
GNU_CONFIGURE= yes |
41 |
|
|
CPPFLAGS+= -I${LOCALBASE}/include |
42 |
|
|
LDFLAGS+= -L${LOCALBASE}/lib |
43 |
|
|
CONFIGURE_ARGS=--with-zlib=/usr \ |
44 |
|
|
${EXTRA_CONF_ARGS} |
45 |
|
|
EXTRA_CONF_ARGS?=--enable-cli \ |
46 |
|
|
--disable-daemon \ |
47 |
|
|
--without-gtk \ |
48 |
|
|
--disable-mac \ |
49 |
|
|
--disable-nls |
50 |
|
|
|
51 |
|
|
.if ${PORT_OPTIONS:MLITE} |
52 |
|
|
CONFIGURE_ARGS+=--enable-lightweight |
53 |
|
|
.endif |
54 |
|
|
|
55 |
|
|
MAN1?= transmission-cli.1 transmission-create.1 transmission-edit.1 \ |
56 |
|
|
transmission-show.1 |
57 |
|
|
EXTRA_PATCHES= ${PATCHDIR}/disable-web |
58 |
|
|
.endif |
59 |
|
|
|
60 |
|
|
USE_XZ= yes |
61 |
|
|
|
62 |
|
|
DOCS= AUTHORS NEWS README |
63 |
|
|
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} |
64 |
|
|
|
65 |
|
|
general-patch: |
66 |
|
|
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \ |
67 |
|
|
's|noinst_PROGRAMS = |noinst_PROGRAMS = #|g' |
68 |
|
|
.if ${SLAVEPORT} != gtk |
69 |
|
|
@${REINPLACE_CMD} -e '/#define DISABLE_GETTEXT/s,/\* \(.*\) \*/,\1,' \ |
70 |
|
|
${WRKSRC}/libtransmission/utils.h |
71 |
|
|
.endif |
72 |
|
|
@${REINPLACE_CMD} -e \ |
73 |
|
|
's|_pthread_flags=".*"|_pthread_flags="${PTHREAD_LIBS}"|g ; \ |
74 |
|
|
s|rt_clock_gettime=yes|rt_clock_gettime=no|g ; \ |
75 |
|
|
s|" == "|" = "|g ; s|$$with_ssl.*/usr;|${OPENSSLBASE};|g' \ |
76 |
|
|
${WRKSRC}/configure |
77 |
|
|
@${REINPLACE_CMD} -e 's|doc \\| \\|g' \ |
78 |
|
|
${WRKSRC}/Makefile.in |
79 |
|
|
.if ${SLAVEPORT} != cli |
80 |
|
|
@${REINPLACE_CMD} -e 's|utils \\|\\|g' \ |
81 |
|
|
${WRKSRC}/Makefile.in |
82 |
|
|
.endif |
83 |
|
|
|
84 |
|
|
post-patch: general-patch |
85 |
|
|
|
86 |
|
|
general-install: |
87 |
|
|
.if ${PORT_OPTIONS:MDOCS} |
88 |
|
|
@${MKDIR} ${DOCSDIR} |
89 |
|
|
.for i in ${DOCS} |
90 |
|
|
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} |
91 |
|
|
.endfor |
92 |
|
|
.endif |
93 |
|
|
|
94 |
|
|
post-install: general-install |
95 |
|
|
|
96 |
|
|
.include <bsd.port.mk> |