summaryrefslogtreecommitdiff
path: root/mail/tpop3d/Makefile
blob: 7ba6a04abb56f6a01a7d369f952593b547526eb0 (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
67
68
69
70
71
# New ports collection makefile for:	tpop3d
# Date created:		27 July 2001
# Whom:			chris@shagged.org
#
# $FreeBSD$
#

PORTNAME=	tpop3d
PORTVERSION=	1.4.2
CATEGORIES=	mail
MASTER_SITES=	http://www.ex-parrot.com/~chris/tpop3d/

MAINTAINER=	chris@shagged.org
COMMENT=	Virtual-domain capable POP3 server supporting MySQL auth

# mysql authentication
.if !defined(WITHOUT_MYSQL)
LIB_DEPENDS+=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client
.endif
.if defined(WITH_LDAP)
LIB_DEPENDS+=	ldap.2:${PORTSDIR}/net/openldap2
.endif

# perl authentication
.if defined(WITH_PERLAUTH)
USE_PERL5=	yes
.endif

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-auth-other \
		--enable-tcp-wrappers \
		--with-mailspool-directory=/var/mail

.if !defined(WITHOUT_MYSQL)
CONFIGURE_ARGS+=	--enable-auth-mysql --with-mysql-root=${LOCALBASE}
.endif
.if defined(WITH_PERLAUTH)
CONFIGURE_ARGS+=	--enable-auth-perl
.endif
.if defined(WITH_LDAP)
CONFIGURE_ARGS+=	--enable-auth-ldap --with-openldap-root=${LOCALBASE}
.endif
.if !defined(WITHOUT_MAILDIR)
CONFIGURE_ARGS+=	--enable-mbox-maildir
.endif

SAMPLE_RCD=	tpop3d.sh.sample
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/${SAMPLE_RCD}
DEFAULT_CONFIG=	${PREFIX}/etc/tpop3d.conf.dist

MAN5=		tpop3d.conf.5
MAN8=		tpop3d.8

post-patch:
	@${PERL} -pi -e 's,^CFLAGS =, CFLAGS = \@CFLAGS\@,' \
		${WRKSRC}/Makefile.in
	@${PERL} -pi -e 's,/etc/tpop3d,${PREFIX}/etc/tpop3d,g' \
		${WRKSRC}/tpop3d.conf.5 ${WRKSRC}/tpop3d.8

post-install:
	${INSTALL_SCRIPT} ${FILESDIR}/tpop3d.conf.dist ${DEFAULT_CONFIG}
	@if [ ! -f ${STARTUP_SCRIPT} ]; then				\
		${INSTALL_SCRIPT} ${FILESDIR}/${SAMPLE_RCD}		\
			${STARTUP_SCRIPT} ;				\
	fi
	@if [ ! -f ${PREFIX}/etc/tpop3d.conf ]; then			\
		${INSTALL_SCRIPT} ${FILESDIR}/tpop3d.conf.dist 		\
			${PREFIX}/etc/tpop3d.conf ;			\
	fi

.include <bsd.port.mk>