summaryrefslogtreecommitdiff
path: root/net-p2p/bnbt/Makefile
blob: d05bf1dbaee639da2dbc4826532f5090d488ddeb (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
# Created by: Florent Thoumie <flz@xbsd.org>
# $FreeBSD$

PORTNAME=	bnbt
PORTVERSION=	8.5
PORTREVISION=	3
CATEGORIES=	net-p2p
MASTER_SITES=	http://opensource.depthstrike.com/${PORTNAME}/
DISTNAME=	${SNAPSHOT}-${PORTNAME}${PORTVERSION:C/\.//}-src
SNAPSHOT=	20060727

MAINTAINER=	ports@FreeBSD.org
COMMENT=	C++ BitTorrent Tracker

BROKEN=		unfetchable
DEPRECATED=	Unfetchable, unmaintained
EXPIRATION_DATE=	2019-10-16

OPTIONS_DEFINE=	MYSQL DOCS

USES=		dos2unix gmake tar:bzip2

SUB_FILES=	pkg-message
USE_RC_SUBR=	bnbt

PORTDOCS=	footer.html header.html

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
ALL_TARGET=	bnbtmysql
USE_MYSQL=	yes
.else
ALL_TARGET=	bnbt
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|-O2|${CFLAGS} -I${PREFIX}/include| ; \
		s|LFLAGS =|LFLAGS = -L${PREFIX}/lib/mysql| ;  \
		s|g++|${CXX}|' \
		${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e 's|\([a-z]*\.bnbt\)|${PREFIX}/etc/${PORTNAME}/\1|' \
		${WRKSRC}/config.cpp
	@${REINPLACE_CMD} -e 's|bnbt.cfg|${PREFIX}/etc/${PORTNAME}/bnbt.cfg|' \
		${WRKSRC}/config.h ${WRKSRC}/config.cpp ${WRKSRC}/tracker.cpp

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${ALL_TARGET} ${STAGEDIR}${PREFIX}/bin/bnbt
	${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/$i ${STAGEDIR}${DOCSDIR}
.endfor
	@${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
	${TOUCH} ${STAGEDIR}/var/log/${PORTNAME}/.keep
	@${MKDIR} ${STAGEDIR}${ETCDIR}
	${TOUCH} ${STAGEDIR}${ETCDIR}/.keep

.include <bsd.port.mk>