summaryrefslogtreecommitdiffstats
path: root/mail/sqwebmail/Makefile
blob: 4a3c3360bc524ad0b2b2c4821caec74c7d51cb5c (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# New ports collection makefile for: sqwebmail
# Date created:		23 Sep 2000
# Whom:			Neil Blakey-Milner
#
# $FreeBSD$
#

PORTNAME=	sqwebmail
PORTVERSION=	1.1.2
CATEGORIES=	mail www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier

MAINTAINER=	nbm@FreeBSD.org

#
# User-serviceable variables
#
# [ There's no need to add trailing ``/''s ]
#
# set CGIBINDIR to where you'd like the cgi to be placed
# set CGIBINSUBDIR to subdirectory of CGIBINDIR, if necessary
# set WEBDATADIR to where you'd like web pages to be placed
# set WEBDATASUBDIR to where you'd like web pages to be placed
# set IMAGEURL to where on the web server URL the images are found
#

CGIBINDIR?=	${PREFIX}/www/cgi-bin.default
CGIBINSUBDIR?=	sqwebmail
WEBDATADIR?=	${PREFIX}/www/data.default
WEBDATASUBDIR?=	sqwebmail
IMAGEURL?=	${WEBDATASUBDIR}

#
# set WITHOUT_CACHEDIR to disable the cache dir (can't set it with WITH_LDAP)
# set CACHEOWNER to who you'd like to own the cache files
# set CACHEDIR to where you'd like your cache directory to be
# set WITH_LDAP for LDAP authentication and addressbook support
# set WITH_VCHKPW for vpopmail authentication
# set WITH_ISPELL to provide spell-checking
# set WITH_MIMETYPES to enable the search for a mime.types file
# set VCHKPW to the home of the vpopmail user, if necessary
#

CACHEDIR?=	/var/sqwebmail/cache
CACHEOWNER?=	bin
VCHKPWLOC?=	${LOCALBASE}/vpopmail

# End of user variables

GNU_CONFIGURE=	YES

CONFIGURE_ARGS= \
	--enable-cgibindir=${CGIBINDIR}/${CGIBINSUBDIR} \
	--enable-imagedir=${WEBDATADIR}/${WEBDATASUBDIR} \
	--without-authmysql \
	--libexecdir=${PREFIX}/libexec/sqwebmail \
	--enable-imageurl=/${IMAGEURL}/

.if defined(WITHOUT_CACHEDIR)
PLIST_SUB+=		CACHE="@comment "
CONFIGURE_ARGS+=	--without-cachedir
.else
PLIST_SUB+=		CACHE=""
CONFIGURE_ARGS+=	--with-cachedir=${CACHEDIR} \
			--with-cacheowner=${CACHEOWNER}
.endif

.if defined(WITH_LDAP)
LIB_DEPENDS+=		ldap.1:${PORTSDIR}/net/openldap
CONFIGURE_ARGS+=	--with-authldap
CONFIGURE_ENV+=		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
			LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
.else
CONFIGURE_ARGS+=	--without-authldap
.endif

.if defined(WITH_VCHKPW)
BUILD_DEPENDS+= ${VCHKPWLOC}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
RUN_DEPENDS+=	${VCHKPWLOC}/bin/vchkpw:${PORTSDIR}/mail/vpopmail

CONFIGURE_ARGS+=	--with-authvchkpw
.else
CONFIGURE_ARGS+=	--without-authvchkpw
.endif

.if defined(WITH_ISPELL)
BUILD_DEPENDS+=	${LOCALBASE}/bin/ispell:${PORTSDIR}/textproc/ispell
RUN_DEPENDS+=	${LOCALBASE}/bin/ispell:${PORTSDIR}/textproc/ispell

CONFIGURE_ARGS+=	--with-ispell=${LOCALBASE}/bin/ispell
.else
CONFIGURE_ARGS+=	--without-ispell
.endif

.if !defined(WITH_MIMETYPES)
CONFIGURE_ARGS+=	--disable-mimetypes
.endif

MANPREFIX=	${PREFIX}/share/sqwebmail
MAN1=		maildirmake.1
MAN8=		makeuserdb.8 userdb.8 userdbpw.8 authlib.8
MLINKS=		authlib.8 authcram.8 \
		authlib.8 authdaemon.8 \
		authlib.8 authdaemond.8 \
		authlib.8 authldap.8 \
		authlib.8 authpam.8 \
		authlib.8 authpwd.8 \
		authlib.8 authshadow.8 \
		authlib.8 authuserdb.8 \
		authlib.8 authvchkpw.8 \
		makeuserdb.8 pw2userdb.8 \
		makeuserdb.8 vchkpw2userdb.8

SBINS=		makeuserdb pw2userdb userdb userdbpw vchkpw2userdb

post-install:
.for a in ${SBINS}
	@${LN} -s ${PREFIX}/share/sqwebmail/sbin/$a ${PREFIX}/sbin/sqwebmail.$a
.endfor

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