summaryrefslogtreecommitdiffstats
path: root/ftp/frox/Makefile
blob: cd0130894020c4aa7ce4447347567ccda294af52 (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
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
77
78
79
80
81
82
83
84
85
86
87
88
# New ports collection makefile for:	frox
# Date created:				11 June 2002
# Whom:					Sergey Matveychuk <sem@ciam.ru>
#
# $FreeBSD$
#

PORTNAME=	frox
PORTVERSION=	0.7.11
CATEGORIES=	ftp
MASTER_SITES=	http://www.hollo.org/frox/download/ \
		http://frox.sourceforge.net/download/ \
		${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	sem@ciam.ru
COMMENT=	Transparent FTP proxy with caching support

USE_BZIP2=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes

MAN1=	frox.1
MAN5=	frox.conf.5

DOCS=	FAQ SECURITY CREDITS ChangeLog

PKGMESSAGE=	${WRKDIR}/pkg-message

CONFIGURE_ARGS=	--enable-configfile=${PREFIX}/etc/frox.conf

.if defined(WITH_IPFILTER)
CONFIGURE_ARGS+=	--enable-ipfilter
.endif
.if defined(WITH_VIRUS_SCAN)
CONFIGURE_ARGS+=	--enable-virus-scan
.endif
.if !defined(WITHOUT_HTTP_CACHE)
CONFIGURE_ARGS+=	--enable-http-cache
.endif
.if !defined(WITHOUT_LOCAL_CACHE)
CONFIGURE_ARGS+=	--enable-local-cache
.endif
.if !defined(WITHOUT_CCP)
CONFIGURE_ARGS+=	--enable-ccp
.endif
.if defined(RUN_AS_ROOT)
CONFIGURE_ARGS+=	--enable-run-as-root
.endif

pre-fetch:
	@${ECHO_MSG} ""
	@${ECHO_MSG} "You can use the following build options:"
	@${ECHO_MSG}
	@${ECHO_MSG} "	WITH_IPFILTER=yes	use ipfilter instead of ipfw;"
	@${ECHO_MSG} "	WITH_VIRUS_SCAN=yes	enable to run external virus scaner on each"
	@${ECHO_MSG} "				download (experimental);"
	@${ECHO_MSG} "	WITHOUT_HTTP_CACHE=yes	disable use of external cache;"
	@${ECHO_MSG} "	WITHOUT_LOCAL_CACHE=yes	disable use of local cache;"
	@${ECHO_MSG} "	WITHOUT_CCP=yes		disable ftp-proxy style command control programs;"
	@${ECHO_MSG} "	RUN_AS_ROOT=yes		allow frox running as root for using"
	@${ECHO_MSG} "				port number <1024 (not recomended)."
	@${ECHO_MSG} ""

pre-patch:
	@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message >${PKGMESSAGE}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/frox ${PREFIX}/sbin
	${INSTALL_DATA} ${WRKSRC}/src/frox.conf ${PREFIX}/etc/frox.conf.sample
	${INSTALL_MAN} ${WRKSRC}/doc/frox.man ${PREFIX}/man/man1/frox.1
	${INSTALL_MAN} ${WRKSRC}/doc/frox.conf.man ${PREFIX}/man/man5/frox.conf.5

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for f in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}
.endfor
.endif
	@${STRIP_CMD} ${PREFIX}/sbin/frox
	@if [ ! -f ${PREFIX}/etc/rc.d/${PORTNAME}.sh ]; then \
		${ECHO_MSG} "Install ${PREFIX}/etc/rc.d/${PORTNAME}.sh startup file."; \
		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d/${PORTNAME}.sh; \
	fi
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud