aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/transmission/Makefile
blob: fcf4ef580b8a012e58b7db481f31b592491a0199 (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
# New ports collection makefile for:    transmission
# Date created:             08 October 2005
# Whom:                 Mezz <mezz@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   transmission
PORTVERSION=    0.5
PORTREVISION?=  0
CATEGORIES= net-p2p
MASTER_SITES=   http://download.m0k.org/${PORTNAME}/files/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=mezz
DISTNAME=   Transmission-${PORTVERSION}

MAINTAINER= mezz@FreeBSD.org
COMMENT?=   A free BitTorrent client written from scratch in C

BUILD_DEPENDS=  jam:${PORTSDIR}/devel/jam

CFLAGS+=    -Wall -W ${CPPFLAGS}
HAS_CONFIGURE=  yes
USE_GETOPT_LONG=yes
CONFIGURE_ARGS?=--prefix=${PREFIX} \
        --disable-gtk

EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude beos \
            --exclude macosx \
            --exclude packageOSX.sh

PLIST_FILES?=   bin/transmissioncli
PORTDOCS=   AUTHORS LICENSE NEWS README

.if defined(WITHOUT_OPENSSL)
CONFIGURE_ARGS+=--disable-openssl
.else
USE_OPENSSL=    yes
CONFIGURE_ARGS+=--openssl-prefix=${OPENSSLBASE}
.endif

pre-everything::
.if !defined(WITHOUT_OPENSSL)
    @${ECHO_MSG} "You may specify the following on the command line:"
    @${ECHO_MSG} " "
.endif
.if !defined(WITHOUT_OPENSSL)
    @${ECHO_MSG} "WITHOUT_OPENSSL=yes to disable OpenSSL support, using built-in SHA1 implementation. Warning, it is a bit slower if you use this option." | ${FMT} 75 75
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g ; \
        s|$$LINKLIBS ;|${LDFLAGS} $$LINKLIBS ;|g ; \
        s|/usr/local/|${LOCALBASE}/|g ; s|/usr/X11R6/|${X11BASE}/|g' \
            ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-O3||g' \
        ${WRKSRC}/Jamrules

# jam -dx, it will giving a verbose of build.
do-build:
    @(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} jam -dx)

.if !defined(SLAVE_PORT)
do-install: docsfiles
    ${INSTALL_PROGRAM} ${WRKSRC}/transmissioncli ${PREFIX}/bin/
.endif

docsfiles:
.ifndef (NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
    @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>