summaryrefslogtreecommitdiff
path: root/net-p2p/mktorrent/Makefile
blob: 995a3cb4580c7450b61204e6956083baf2b2fcc5 (plain)
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
# Created by: Damian Gerow <dgerow@afflictions.org>
# $FreeBSD$

PORTNAME=	mktorrent
PORTVERSION=	1.0
CATEGORIES=	net-p2p
MASTER_SITES=	SF

MAINTAINER=	dgerow@afflictions.org
COMMENT=	Command-line utility for creating BitTorrent metainfo files

.if defined(.PARSEDIR)
USES=		gmake
.else
MAKEFILE=	BSDmakefile
.endif
MAKE_FLAGS=	USE_LONG_OPTIONS=1

PLIST_FILES=	bin/mktorrent

OPTIONS_DEFINE=	THREADS OPENSSL HASHCHECK
OPTIONS_DEFAULT=	THREADS OPENSSL HASHCHECK
THREADS_DESC=	Enable support for pthreads
OPENSSL_DESC=	Use OpenSSL for hashing
HASHCHECK_DESC=	Verify file hashes

OPENSSL_USES=		ssl
OPENSSL_CFLAGS=		-I${OPENSSLINC}
OPENSSL_LDFLAGS=	-L${OPENSSLLIB}

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTHREADS}
MAKE_FLAGS+=	USE_PTHREADS=1
.endif

.if ${PORT_OPTIONS:MOPENSSL}
MAKE_FLAGS+=	USE_OPENSSL=1
.endif

.if ! ${PORT_OPTIONS:MHASHCHECK}
MAKE_FLAGS+=	NO_HASH_CHECK=1
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>