# New ports collection Makefile for:	proxy-suite
# Date created:				06 April 2001
# Whom:					Thomas Quinot <thomas@cuivre.fr.eu.org>
#
# $FreeBSD: ports/net/proxy-suite/Makefile,v 1.1 2001/04/07 05:54:49 will Exp $
#

PORTNAME=	proxy-suite
PORTVERSION=	1.7.tp8
CATEGORIES=	security net
MASTER_SITES=	\
ftp://ftp.suse.com/pub/projects/proxy-suite/src/ \
ftp://ftp.crc.ca/pub/systems/linux/suse/projects/proxy-suite/src/ \
ftp://ftp.gwdg.de/pub/linux/suse/ftp.suse.com/projects/proxy-suite/src/ \
ftp://ftp.funet.fi/pub/mirrors/ftp.suse.com/pub/projects/proxy-suite/src/
DISTNAME=	${PORTNAME}-1.7

PATCH_SITES=    ${MASTER_SITES}
PATCHFILES=	${PORTNAME}-1.7tp8.dif

MAINTAINER=	thomas@cuivre.fr.eu.org

USE_AUTOCONF=	yes
USE_GMAKE=	yes

#
# basic configure args
#
CONFIGURE_ARGS=	--prefix=${PREFIX} \
		--sysconfdir=${PREFIX}/etc/proxy-suite \
		--localstatedir=/var/run \
		--enable-warnings --enable-so-linger --enable-rfc1579 \
		--disable-rfc2428 --disable-proc-mods

#
# default: build static lib
#
.if !defined(USE_SHARED)
CONFIGURE_ARGS+=	--enable-static
.endif

.if exists(/usr/include/regex.h)
CONFIGURE_ARGS+=	--with-regex
.endif

#
# try to use tcp-wrapper
#
.if exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+=	--with-libwrap
BUILD_DEPENDS+=		/usr/lib/libwrap.a:${PORTSDIR}/security/tcp_wrapper
.endif

#
# OPTIONAL: include ldap-support - currently ldap.2 needs minor fixes...
#
.if defined(WITH_LDAP)
CONFIGURE_ARGS+=	--with-libldap
LIB_DEPENDS+=		ldap.1:${PORTSDIR}/net/openldap
.else
CONFIGURE_ARGS+=	--without-libldap
.endif

#
# OPTIONAL: re-build the sgml documentation (postscript, html)
# unfortunatenly this docu it is not up to date :-((
# reading of the manual pages and HOWTO's makes more sense...
#
.if !defined(WITH_SGMLDOC)
ALL_TARGET=	 -C ftp-proxy
.endif

MAN8=		ftp-proxy.8
MAN5=		ftp-proxy.conf.5

pre-build:
	@cd ${WRKSRC} ; aclocal ; autoheader ; autoconf

pre-install:
	@strip ${WRKSRC}/ftp-proxy/ftp-proxy

.include <bsd.port.mk>
