2002-01-15 07:17:28 +01:00
|
|
|
# New ports collection makefile for: Courier MTA
|
|
|
|
# Date created: 17 Oct 2001
|
|
|
|
# Whom: Yarema <yds@CoolRat.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= courier
|
2004-01-15 16:12:32 +01:00
|
|
|
PORTVERSION= 0.44.2
|
2004-02-04 06:21:48 +01:00
|
|
|
PORTREVISION= 1
|
2002-01-15 07:17:28 +01:00
|
|
|
CATEGORIES= mail ipv6
|
2002-02-26 23:40:11 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2002-01-15 07:17:28 +01:00
|
|
|
MASTER_SITE_SUBDIR= courier
|
|
|
|
|
2003-08-10 00:40:32 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-02-21 13:51:06 +01:00
|
|
|
COMMENT= Courier SMTP IMAP POP3 HTTP mail server suite
|
2002-01-15 07:17:28 +01:00
|
|
|
|
2004-03-31 22:33:46 +02:00
|
|
|
FORBIDDEN= http://vuxml.freebsd.org/98bd69c3-834b-11d8-a41f-0020ed76ef5a.html
|
|
|
|
|
2004-01-15 16:12:32 +01:00
|
|
|
CONFLICTS= exim-4.* courier-imap-2.* maildrop-1.* \
|
|
|
|
postfix-1.* postfix-2.* \
|
|
|
|
qmail-1.* qmail-*-1.* \
|
|
|
|
sendmail-8.* sendmail-*-8.* \
|
|
|
|
smail-3.* sqwebmail-3.* zmailer-2.*
|
|
|
|
|
|
|
|
.if defined(WITH_GHOSTSCRIPT_AFPL) && ${WITH_GHOSTSCRIPT_AFPL} == yes
|
|
|
|
GSPORT?= print/ghostscript-afpl
|
|
|
|
.else
|
|
|
|
GSPORT?= print/ghostscript-gnu
|
|
|
|
.endif
|
|
|
|
|
|
|
|
LIB_DEPENDS= fam.0:${PORTSDIR}/devel/fam
|
2002-01-30 04:56:09 +01:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/share/sysconftool/sysconftool:${PORTSDIR}/devel/sysconftool \
|
2004-02-23 05:42:13 +01:00
|
|
|
${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net-mgmt/p5-Net-CIDR
|
2002-01-15 07:17:28 +01:00
|
|
|
|
2002-06-08 20:54:01 +02:00
|
|
|
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
|
|
|
|
IS_INTERACTIVE= yes
|
|
|
|
.endif
|
2002-03-06 23:09:01 +01:00
|
|
|
|
2002-01-15 07:17:28 +01:00
|
|
|
#
|
|
|
|
# User-serviceable variables
|
|
|
|
#
|
|
|
|
# [ There's no need to add trailing ``/''s ]
|
|
|
|
#
|
|
|
|
# set IMAGEURL to where on the web server URL the images are found
|
2002-01-30 04:56:09 +01:00
|
|
|
# set CACHEOWN to who you'd like to own the cache files
|
2002-01-15 07:17:28 +01:00
|
|
|
# set MAILDROPDEFAULT to what you'd like the $DEFAULT in maildrop to be
|
|
|
|
# recomended values are: /var/mail, ./Mailbox or ./Maildir
|
|
|
|
#
|
|
|
|
IMAGEURL?= /webmail
|
2002-01-30 04:56:09 +01:00
|
|
|
CACHEOWN?= pop
|
2002-01-15 07:17:28 +01:00
|
|
|
MAILDROPDEFAULT?=./Maildir
|
|
|
|
# End of user-serviceable variables
|
2004-01-15 16:12:32 +01:00
|
|
|
MAILOWN= courier
|
|
|
|
MAILGRP= courier
|
|
|
|
MAILUID= 465
|
|
|
|
MAILGID= 465
|
2002-01-15 07:17:28 +01:00
|
|
|
ETCDIR= ${PREFIX}/etc
|
|
|
|
SYSCONFDIR= ${ETCDIR}/courier
|
|
|
|
USERDB= ${ETCDIR}/userdb
|
|
|
|
LIBEXECDIR= ${PREFIX}/libexec
|
|
|
|
LOCALSTATEDIR= /var/spool/courier
|
|
|
|
CACHEDIR= /var/spool/webmail
|
|
|
|
CALENDIR= /var/spool/calendar
|
2002-06-08 20:54:01 +02:00
|
|
|
MIMETYPES= ${LOCALBASE}/etc/apache/mime.types:${LOCALBASE}/etc/apache2/mime.types
|
2002-01-15 07:17:28 +01:00
|
|
|
|
2003-08-10 00:40:32 +02:00
|
|
|
USE_BZIP2= yes
|
2002-03-25 10:19:20 +01:00
|
|
|
USE_SUBMAKE= yes
|
2002-01-30 04:56:09 +01:00
|
|
|
USE_PERL5= yes
|
2002-01-15 07:17:28 +01:00
|
|
|
USE_GMAKE= yes
|
|
|
|
USE_OPENSSL= yes
|
2004-01-15 16:12:32 +01:00
|
|
|
USE_RC_SUBR= yes
|
|
|
|
USE_REINPLACE= yes
|
|
|
|
USE_LIBTOOL_VER=15
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
CONFIGURE_ENV= REHASH=${SCRIPTDIR}/c_rehash \
|
|
|
|
CPPFLAGS='${CPPFLAGS}' \
|
|
|
|
LDFLAGS='${LDFLAGS}'
|
|
|
|
MAKE_ENV:= ${CONFIGURE_ENV}
|
2002-01-15 07:17:28 +01:00
|
|
|
CONFIGURE_ARGS= --disable-root-check --with-db=db \
|
|
|
|
--enable-syslog=1 --enable-use-flock \
|
2004-01-15 16:12:32 +01:00
|
|
|
--program-transform-name=s,^,, \
|
2002-01-30 04:56:09 +01:00
|
|
|
--with-mailuser=${MAILOWN} \
|
|
|
|
--with-mailgroup=${MAILGRP} \
|
2002-01-15 07:17:28 +01:00
|
|
|
--with-mailuid=${MAILUID} \
|
|
|
|
--with-mailgid=${MAILGID} \
|
|
|
|
--with-etcdir=${ETCDIR} \
|
|
|
|
--sysconfdir=${SYSCONFDIR} \
|
|
|
|
--with-userdb=${USERDB} \
|
|
|
|
--datadir=${DATADIR} \
|
|
|
|
--libexecdir=${LIBEXECDIR} \
|
|
|
|
--localstatedir=${LOCALSTATEDIR} \
|
|
|
|
--enable-mimetypes=${MIMETYPES} \
|
|
|
|
--enable-imageurl=${IMAGEURL} \
|
|
|
|
--with-cachedir=${CACHEDIR} \
|
2002-01-30 04:56:09 +01:00
|
|
|
--with-cacheowner=${CACHEOWN} \
|
2002-01-15 07:17:28 +01:00
|
|
|
--with-calendardir=${CALENDIR} \
|
|
|
|
--with-default-maildrop=${MAILDROPDEFAULT} \
|
|
|
|
--enable-workarounds-for-imap-client-bugs
|
2004-01-15 16:12:32 +01:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2002-01-22 05:44:18 +01:00
|
|
|
|
2002-01-15 07:17:28 +01:00
|
|
|
PKGMESSAGE= ${WRKDIR}/.PKGMESSAGE
|
|
|
|
|
2002-01-22 05:44:18 +01:00
|
|
|
INSTALL_TARGET= install-strip install-perms
|
2002-01-15 07:17:28 +01:00
|
|
|
|
2002-01-30 04:56:09 +01:00
|
|
|
PLIST_SUB+= BINOWN="${BINOWN}" BINGRP="${BINGRP}" \
|
|
|
|
MAILOWN="${MAILOWN}" MAILGRP="${MAILGRP}" \
|
|
|
|
MAILUID="${MAILUID}" MAILGID="${MAILGID}" \
|
|
|
|
CACHEOWN="${CACHEOWN}"
|
2002-01-15 07:17:28 +01:00
|
|
|
|
|
|
|
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
2002-06-08 20:54:01 +02:00
|
|
|
WITH_EXPECT="${WITH_EXPECT:L}" \
|
|
|
|
WITH_GNUPG="${WITH_GNUPG:L}" \
|
|
|
|
WITH_ASPELL="${WITH_ASPELL:L}" \
|
|
|
|
WITH_ISPELL="${WITH_ISPELL:L}" \
|
2004-01-15 16:12:32 +01:00
|
|
|
WITH_LDAP="${WITH_LDAP:L}" \
|
2002-06-08 20:54:01 +02:00
|
|
|
WITH_MYSQL="${WITH_MYSQL:L}" \
|
|
|
|
WITH_PGSQL="${WITH_PGSQL:L}" \
|
|
|
|
WITH_VPOPMAIL="${WITH_VPOPMAIL:L}" \
|
|
|
|
WITH_PROCMAIL="${WITH_PROCMAIL:L}" \
|
|
|
|
WITH_SENDFAX="${WITH_SENDFAX:L}" \
|
2004-01-15 16:12:32 +01:00
|
|
|
WITH_UUCP="${WITH_UUCP:L}" \
|
2002-06-08 20:54:01 +02:00
|
|
|
WITH_IPV6="${WITH_IPV6:L}" \
|
2002-01-15 07:17:28 +01:00
|
|
|
TOUCH="${TOUCH}" \
|
|
|
|
MKDIR="${MKDIR}"
|
|
|
|
|
2002-06-08 20:54:01 +02:00
|
|
|
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
|
|
|
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
|
|
|
.endif
|
2002-01-15 07:17:28 +01:00
|
|
|
.include "${.CURDIR}/Makefile.man"
|
|
|
|
.include "${.CURDIR}/Makefile.doc"
|
2002-01-30 04:56:09 +01:00
|
|
|
.include "${.CURDIR}/Makefile.own"
|
2002-01-15 07:17:28 +01:00
|
|
|
|
2002-01-24 06:53:56 +01:00
|
|
|
pre-everything::
|
2003-09-24 16:17:44 +02:00
|
|
|
@${ECHO_MSG} ""
|
2004-01-15 16:12:32 +01:00
|
|
|
@${ECHO_MSG} "You may use the following build options:"
|
2003-09-24 16:17:44 +02:00
|
|
|
@${ECHO_MSG} ""
|
2004-01-15 16:12:32 +01:00
|
|
|
@${ECHO_MSG} " WITH_EXPECT=yes Expect support for WebMail change passwd"
|
|
|
|
@${ECHO_MSG} " WITH_GNUPG=yes GNU Privacy Guard support for WebMail"
|
|
|
|
@${ECHO_MSG} " WITH_ASPELL=yes ASpell support for WebMail"
|
|
|
|
@${ECHO_MSG} " WITH_ISPELL=yes ISpell support for WebMail"
|
|
|
|
@${ECHO_MSG} " WITH_LDAP=yes OpenLDAP 2.x authentication support"
|
|
|
|
.if !defined(WANT_OPENLDAP_VER)
|
|
|
|
@${ECHO_MSG} " WANT_OPENLDAP_VER=?? See <bsd.port.mk> for legal values"
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} " WITH_MYSQL=yes MySQL authentication support"
|
|
|
|
@${ECHO_MSG} " WITH_PGSQL=yes PostgreSQL authentication support"
|
|
|
|
@${ECHO_MSG} " WITH_VPOPMAIL=yes VPopMail authentication support"
|
|
|
|
@${ECHO_MSG} " WITH_PROCMAIL=yes Procmail local delivery support"
|
|
|
|
@${ECHO_MSG} " WITH_SENDFAX=yes mgetty+sendfax support"
|
|
|
|
.if !defined(WITH_GHOSTSCRIPT_AFPL) || ${WITH_GHOSTSCRIPT_AFPL} != yes
|
|
|
|
@${ECHO_MSG} " WITH_GHOSTSCRIPT_AFPL=yes to use AFPL Postscript"
|
|
|
|
@${ECHO_MSG} " interpreter instead of GNU one"
|
|
|
|
@${ECHO_MSG} " for mgetty+sendfax support"
|
2003-08-31 03:30:02 +02:00
|
|
|
.endif
|
2004-01-15 16:12:32 +01:00
|
|
|
@${ECHO_MSG} " WITH_UUCP=yes UUCP support"
|
|
|
|
@${ECHO_MSG} " WITH_IPV6=yes Pv6 support"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} " BATCH=yes To skip INTERACTIVE selection"
|
|
|
|
@${ECHO_MSG} " of above tunables"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.${PORTNAME}
|
2003-08-31 03:30:02 +02:00
|
|
|
|
2002-01-15 07:17:28 +01:00
|
|
|
post-patch:
|
|
|
|
@${PERL} -pi -e 's:\@datadir\@:\@sysconfdir\@:g;' \
|
|
|
|
${WRKSRC}/*/mk*cert.* \
|
|
|
|
${WRKSRC}/*/*/mk*cert.*
|
|
|
|
@${PERL} -pi -e 's:^(TLS_CERTFILE=)\@datadir\@:$$1\@sysconfdir\@:g;' \
|
|
|
|
${WRKSRC}/*/*.dist.in \
|
|
|
|
${WRKSRC}/*/*/*.dist.in
|
2002-01-30 04:56:09 +01:00
|
|
|
@${PERL} -pi -e 's:^(RANDFILE = )\@datadir\@\S+:$$1\@sysconfdir\@/random.tmp:g;' \
|
2002-01-15 07:17:28 +01:00
|
|
|
${WRKSRC}/*/*.cnf.in \
|
|
|
|
${WRKSRC}/*/*/*.cnf.in
|
|
|
|
|
|
|
|
pre-configure:
|
2004-01-15 16:12:32 +01:00
|
|
|
@${SED} -e s:%%RC_SUBR%%:${RC_SUBR}: \
|
|
|
|
-e s:%%PREFIX%%:${PREFIX}: ${FILESDIR}/courier.sh > ${WRKDIR}/courier.sh
|
|
|
|
@${SED} -e s:%%PREFIX%%:${PREFIX}: ${.CURDIR}/pkg-message > ${WRKDIR}/.PKGMESSAGE
|
|
|
|
@${SED} -e s:%%PREFIX%%:${PREFIX}: ${FILESDIR}/crontab > ${WRKDIR}/crontab
|
|
|
|
|
2002-01-15 07:17:28 +01:00
|
|
|
post-build:
|
2004-01-15 16:12:32 +01:00
|
|
|
@${PERL} -pi -e 's:^(auth)\s+(required).*:$$1\t\t$$2\tpam_unix.so\ttry_first_pass:g;' \
|
|
|
|
-e 's:^(account)\s+(required).*:$$1 \t$$2\tpam_unix.so:g;' \
|
|
|
|
-e 's:^(session)\s+(required).*:$$1 \t$$2\tpam_permit.so:g;' \
|
2002-01-15 07:17:28 +01:00
|
|
|
${WRKSRC}/*/*.authpam* \
|
|
|
|
${WRKSRC}/*/*/*.authpam*
|
2004-01-15 16:12:32 +01:00
|
|
|
@${LN} -f ${WRKSRC}/gpglib/README.html ${WRKSRC}/gpglib/README.gpglib.html
|
|
|
|
@${LN} -f ${WRKSRC}/imap/FAQ ${WRKSRC}/imap/FAQ.imap
|
|
|
|
@${LN} -f ${WRKSRC}/imap/FAQ.html ${WRKSRC}/imap/FAQ.imap.html
|
|
|
|
@${LN} -f ${WRKSRC}/imap/README ${WRKSRC}/imap/README.imap
|
|
|
|
@${LN} -f ${WRKSRC}/imap/README.html ${WRKSRC}/imap/README.imap.html
|
|
|
|
@${LN} -f ${WRKSRC}/maildrop/README.html ${WRKSRC}/maildrop/README.maildrop.html
|
|
|
|
@${LN} -f ${WRKSRC}/pcp/README.html ${WRKSRC}/pcp/README.pcp.html
|
|
|
|
@${LN} -f ${WRKSRC}/webmail/BUGS ${WRKSRC}/webmail/BUGS.webmail
|
|
|
|
@${LN} -f ${WRKSRC}/webmail/BUGS.html ${WRKSRC}/webmail/BUGS.webmail.html
|
|
|
|
@${LN} -f ${WRKSRC}/webmail/SECURITY ${WRKSRC}/webmail/SECURITY.webmail
|
|
|
|
@${LN} -f ${WRKSRC}/webmail/SECURITY.html ${WRKSRC}/webmail/SECURITY.webmail.html
|
2002-01-15 07:17:28 +01:00
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${LN} -f ${SYSCONFDIR}/maildrop ${SYSCONFDIR}/maildropfilter
|
|
|
|
@${INSTALL_DATA} /dev/null ${SYSCONFDIR}/locallowercase
|
|
|
|
@${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/etc/courier/
|
2004-01-15 16:12:32 +01:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/courier.sh ${PREFIX}/etc/rc.d/
|
2002-01-30 04:56:09 +01:00
|
|
|
.for file in ${OWNER0}
|
2004-01-15 16:12:32 +01:00
|
|
|
@-${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/${file}
|
2002-01-30 04:56:09 +01:00
|
|
|
.endfor
|
2002-01-15 07:17:28 +01:00
|
|
|
@${GREP} '^@exec ' ${TMPPLIST} \
|
|
|
|
| ${SED} -e 's:^@exec ::' -e 's:%D:${PREFIX}:g' \
|
|
|
|
> ${WRKDIR}/.PLIST.exec \
|
|
|
|
&& ${SH} ${WRKDIR}/.PLIST.exec
|
|
|
|
.if !defined(NOPORTDOCS)
|
2002-01-30 04:56:09 +01:00
|
|
|
@${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR}/html
|
2002-01-15 07:17:28 +01:00
|
|
|
@${INSTALL_DATA} ${DATADIR}/htmldoc/* ${DOCSDIR}/html
|
|
|
|
.for file in ${DOCS}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
@${RM} -rf ${DATADIR}/htmldoc
|
|
|
|
@for F in ${MANPREFIX}/man/man[1-9ln]/*; \
|
|
|
|
do ${CHMOD} ${MANMODE} $$F; \
|
|
|
|
done
|
2002-01-30 04:56:09 +01:00
|
|
|
@${CHOWN} -Rh ${MANOWN}:${MANGRP} ${MANPREFIX}/man/man[1-9ln]
|
|
|
|
@${CHOWN} -Rh ${SHAREOWN}:${SHAREGRP} ${DATADIR}
|
2002-08-21 03:53:45 +02:00
|
|
|
@${CHMOD} -R a+r ${DATADIR}/courierwebadmin
|
2002-01-15 07:17:28 +01:00
|
|
|
@${CHMOD} -R a-w ${DATADIR}
|
2003-09-24 16:17:44 +02:00
|
|
|
@${ECHO_MSG} ""
|
2002-01-15 07:17:28 +01:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2003-09-24 16:17:44 +02:00
|
|
|
@${ECHO_MSG} ""
|
2004-01-15 16:12:32 +01:00
|
|
|
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
|
|
|
|
@PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} " To activate Courier in /etc/mail/mailer.conf or to"
|
|
|
|
@${ECHO_MSG} " replace {sendmail,mailq,newaliases} with Courier"
|
|
|
|
@${ECHO_MSG} " versions execute the following as root user:"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "PKG_PREFIX=\"${PREFIX}\" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
2002-01-15 07:17:28 +01:00
|
|
|
|
|
|
|
post-clean:
|
|
|
|
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|