aboutsummaryrefslogtreecommitdiff
path: root/ftp/tnftpd/Makefile
blob: b0c9a31c4d78c538bcc818a2881d95e191bd3d5b (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
# New ports collection makefile for:	tnftpd
# Date created:				3 August 2003
# Whom:					ports
#
# $FreeBSD$
#

PORTNAME=	tnftpd
PORTVERSION=	20080609
CATEGORIES=	ftp ipv6
MASTER_SITES=	ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/

MAINTAINER=	cejkar@fit.vutbr.cz
COMMENT=	Enhanced ftp server from NetBSD

GNU_CONFIGURE=	yes

CFLAGS+=	-DSUPPORT_UTMP

.if defined(WITH_SOCKS5)
BUILD_DEPENDS+=	${LOCALBASE}/lib/libsocks5.a:${PORTSDIR}/net/socks5
CONFIGURE_ARGS+=	--with-socks5
.endif

MAN5=		ftpd.conf.5 ftpusers.5
MAN8=		tnftpd.8
PLIST_FILES=	libexec/tnftpd
PORTDOCS=	ChangeLog NEWS README THANKS COPYING

SUB_FILES=	pkg-message
FIXPREFIX=	ftpd.8 ftpd.conf.5 ftpusers.5

pre-patch:
.for f in ${FIXPREFIX}
	${REINPLACE_CMD} -e \
		"s@^\.Dq Pa /etc@.Dq Pa ${PREFIX}/etc@g; \
		s@^\.Pa /etc@.Pa ${PREFIX}/etc@g; \
		s@^\.It Pa /etc/@.It Pa ${PREFIX}/etc/@g; \
		s@^\.Ss /etc/@.Ss ${PREFIX}/etc/@g; \
		s@^\.Sx /etc/@.Sx ${PREFIX}/etc/@g; \
		s@^\.Bl -tag -width /etc/@.Bl -tag -width ${PREFIX}/etc/@g; \
		s@${PREFIX}/etc/shells@/etc/shells@g; \
		s@${PREFIX}/etc/nologin@/etc/nologin@g; \
		s@${PREFIX}/etc/pwd.db@/etc/pwd.db@g" \
	${WRKSRC}/src/${f}
.endfor
	${REINPLACE_CMD} -e \
		"s@^#define	_DEFAULT_CONFDIR	\"/etc\"@#define	_DEFAULT_CONFDIR	\"${PREFIX}/etc\"@" \
	${WRKSRC}/src/pathnames.h

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/tnftpd ${PREFIX}/libexec
	${INSTALL_MAN} ${WRKSRC}/src/ftpd.8 ${PREFIX}/man/man8/tnftpd.8
	${INSTALL_MAN} ${WRKSRC}/src/ftpd.conf.5 ${PREFIX}/man/man5
	${INSTALL_MAN} ${WRKSRC}/src/ftpusers.5 ${PREFIX}/man/man5
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>