2000-10-14 04:51:41 +00:00
|
|
|
# New ports collection makefile for: sendmail
|
|
|
|
# Date created: 20 Apr 2000
|
|
|
|
# Whom: dirk.meyer@dinoex.sub.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= sendmail
|
2001-01-05 03:15:42 +00:00
|
|
|
PORTVERSION= 8.11.2
|
2000-12-21 07:32:18 +00:00
|
|
|
CATEGORIES= mail ipv6
|
2000-10-14 04:51:41 +00:00
|
|
|
MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/
|
|
|
|
DISTNAME= ${PORTNAME}.${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= dirk.meyer@dinoex.sub.org
|
|
|
|
|
|
|
|
NO_PACKAGE= "sendmail included in base system"
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2001-01-05 03:15:42 +00:00
|
|
|
WCONF= ${WRKSRC}/devtools/Site
|
2000-10-14 04:51:41 +00:00
|
|
|
PLIST= ${WRKDIR}/.PLIST.more
|
|
|
|
|
2000-12-21 07:32:18 +00:00
|
|
|
.if defined(SENDMAIL_WITH_TSL)
|
|
|
|
USE_OPENSSL= yes
|
|
|
|
.endif
|
2001-01-25 14:34:48 +00:00
|
|
|
.if defined(SENDMAIL_WITH_SASL)
|
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/sbin/pwcheck:${PORTSDIR}/security/cyrus-sasl
|
|
|
|
.endif
|
2000-12-21 07:32:18 +00:00
|
|
|
|
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf)
|
2000-10-14 04:51:41 +00:00
|
|
|
pre-configure:
|
|
|
|
${SED} -e "s=%%PREFIX%%=${PREFIX}=" \
|
2001-01-05 03:15:42 +00:00
|
|
|
${FILESDIR}/site.config.m4 > ${WCONF}/site.config.m4
|
2000-12-21 07:32:18 +00:00
|
|
|
.if defined(SENDMAIL_WITH_TSL)
|
2001-01-05 03:15:42 +00:00
|
|
|
${CAT} ${FILESDIR}/site.config.m4.tls >> ${WCONF}/site.config.m4
|
2000-12-21 07:32:18 +00:00
|
|
|
.endif
|
2001-01-25 14:34:48 +00:00
|
|
|
.if defined(SENDMAIL_WITH_SASL)
|
|
|
|
${SED} -e "s=%%LOCALBASE%%=${LOCALBASE}=" \
|
|
|
|
${FILESDIR}/site.config.m4.sasl >>${WCONF}/site.config.m4
|
|
|
|
.endif
|
2000-10-14 04:51:41 +00:00
|
|
|
.else
|
|
|
|
pre-configure:
|
|
|
|
${SED} -e "s=%%PREFIX%%=${PREFIX}=" \
|
2001-01-05 03:15:42 +00:00
|
|
|
${FILESDIR}/site.config.m4.pre4 > ${WCONF}/site.config.m4
|
2000-12-21 07:32:18 +00:00
|
|
|
.if defined(SENDMAIL_WITH_TSL)
|
2001-01-05 03:15:42 +00:00
|
|
|
${SED} -e "s=%%LOCALBASE%%=${LOCALBASE}=" \
|
|
|
|
${FILESDIR}/site.config.m4.ssl >> ${WCONF}/site.config.m4
|
2000-12-21 07:32:18 +00:00
|
|
|
.endif
|
2000-10-14 04:51:41 +00:00
|
|
|
|
|
|
|
PREFIX?= ${DESTDIR}/usr
|
|
|
|
MANPREFIX?= ${DESTDIR}/usr/share
|
|
|
|
.endif
|
|
|
|
|
|
|
|
PLIST_SUB+= PREFIX=${PREFIX:S=${PREFIX}/==}
|
|
|
|
SENDMAIL= ${PREFIX}/sbin/sendmail
|
|
|
|
|
|
|
|
MAN1= mailq.1 newaliases.1 vacation.1
|
|
|
|
MAN5= aliases.5
|
|
|
|
MAN8= sendmail.8 mailstats.8 makemap.8 praliases.8 smrsh.8 \
|
|
|
|
mail.local.8 rmail.8
|
|
|
|
|
|
|
|
pre-install:
|
|
|
|
${CAT} ${PKGDIR}/pkg-plist >${PLIST}
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
cd ${WRKSRC} && find cf -type f | \
|
|
|
|
${AWK} '{print "share/sendmail/" $$1}' >>${PLIST}
|
|
|
|
cd ${WRKSRC} && find -d cf -type d | \
|
|
|
|
${AWK} '{print "@dirrm share/sendmail/" $$1}' >>${PLIST}
|
2000-12-21 07:32:18 +00:00
|
|
|
${ECHO} "@dirrm share/sendmail" >>${PLIST}
|
2000-10-14 04:51:41 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# We want mail.local and rmail for our system.
|
|
|
|
# the build install catmans only, we have to fix this.
|
|
|
|
post-install:
|
|
|
|
( cd ${WRKSRC}/mail.local && ${MAKE} force-install )
|
|
|
|
( cd ${WRKSRC}/rmail && ${MAKE} force-install )
|
|
|
|
.for i in ${MAN8}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN5}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat5/${i} ${MANPREFIX}/man/cat5/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man5
|
|
|
|
.endfor
|
|
|
|
.for i in ${MAN1}
|
|
|
|
@${RM} -f ${MANPREFIX}/man/cat1/${i} ${MANPREFIX}/man/cat1/${i}.gz
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man1
|
|
|
|
.endfor
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${PREFIX}/share/sendmail
|
|
|
|
@cd ${WRKSRC}; ${TAR} cf - cf |\
|
|
|
|
(cd ${PREFIX}/share/sendmail; ${TAR} xf -)
|
|
|
|
.endif
|
|
|
|
.if exists(${DESTDIR}/etc/mail/mailer.conf)
|
2000-10-14 06:34:25 +00:00
|
|
|
@${SED} s!%%PREFIX%%!${PREFIX}!g ${PKGMESSAGE}
|
2000-10-14 04:51:41 +00:00
|
|
|
|
|
|
|
mailer.conf:
|
|
|
|
${SED} \
|
|
|
|
-e "s=^sendmail[ ]*/.*$$=sendmail ${SENDMAIL}=" \
|
|
|
|
-e "s=^send-mail[ ]*/.*$$=send-mail ${SENDMAIL}=" \
|
|
|
|
-e "s=^mailq[ ]*/.*$$=mailq ${SENDMAIL}=" \
|
|
|
|
-e "s=^newaliases[ ]*/.*$$=newaliases ${SENDMAIL}=" \
|
|
|
|
${DESTDIR}/etc/mail/mailer.conf > ${DESTDIR}/etc/mail/mailer.conf.new
|
|
|
|
${MV} ${DESTDIR}/etc/mail/mailer.conf.new ${DESTDIR}/etc/mail/mailer.conf
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|