1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00
freebsd-ports/mail/qmail-vida/Makefile

324 lines
12 KiB
Makefile

# New ports collection makefile for: qmail-vida
# Date created: 22 Aug 2005
# Whom: FURUTATE,Mikihiko<futurebsd@infoseek.to>
#
# $FreeBSD$
#
PORTNAME= qmail-vida
PORTVERSION= 0.53
CATEGORIES= mail
MASTER_SITES+= ${MASTER_SITE_SOURCEFORGE_JP:S/$/:vida/} \
${MASTER_SITE_QMAIL:S/$/:qmail/} \
http://cr.yp.to/checkpwd/:checkpassword \
http://cr.yp.to/ucspi-tcp/:tcpserver
MASTER_SITE_SUBDIR=${PORTNAME}/2100/:vida
MAINTAINER= futurebsd@infoseek.to
COMMENT= SMTP_AUTH/APOP support for qmail
IGNORE= abuses UID registered to another port, and uses unregistered GID
DISTFILES= ${DISTNAME}.tar.gz:vida \
${DISTNAME_QMAIL}.tar.gz:qmail \
${DISTNAME_CHECKPASSWORD}.tar.gz:checkpassword \
${DISTNAME_TCPSERVER}.tar.gz:tcpserver
DIST_SUBDIR= qmail-vida
PATCH_WRKSRC= ${WRKSRC_QMAIL}
CONFLICTS= qmail-[0-9]* qmail-mysql-[0-9]* qmail-ldap-[0-9]* \
qmail-smtp_auth+tls-[0-9]* qmail-spamcontrol-[0-9]* \
qmail-tls-[0-9]* checkpassword-[0-9]* ucspi-tcp-[0-9]* \
daemontools-[0-9]*
DISTNAME_QMAIL= qmail-1.03
DISTNAME_CHECKPASSWORD= checkpassword-0.90
DISTNAME_TCPSERVER= ucspi-tcp-0.88
WRKSRC_QMAIL= ${WRKDIR}/${DISTNAME_QMAIL}
WRKSRC_CHECKPASSWORD= ${WRKDIR}/${DISTNAME_CHECKPASSWORD}
WRKSRC_TCPSERVER= ${WRKDIR}/${DISTNAME_TCPSERVER}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PKGINSTALL?= ${WRKDIR}/pkg-install
CSH?= /bin/csh
PREFIX?= /var/qmail
PORTDOCS= *
RESTRICTED= "djb\'s packaging license does not allow non-standard qmail binary distributions"
QMAIL_VERSION?= 1.03
ALL_TARGET_QMAIL= default dot-qmail.5 qmail-control.5 qmail-getpw.8 \
qmail-limits.7 qmail-newmrh.8 qmail-newu.8 qmail-pw2u.8 \
qmail-send.8 qmail-start.8 qmail-users.5
ALL_TARGET_CHECKPASSWORD= it
ALL_TARGET_TCPSERVER= prog install instcheck
SCRIPTS_ENV= BINOWN="${BINOWN}" BINGRP="${BINGRP}" BINMODE="${BINMODE}" \
MANMODE="${MANMODE}" CFLAGS="${CFLAGS}"
PLIST_SUB+= README_AUTH="@comment "
PLIST_SUB+= LDAP="@comment " NOT_LDAP=""
PLIST_SUB+= SMTP_AUTH_TLS="@comment "
PLIST_SUB+= SPAMCONTROL="@comment "
PLIST_SUB+= TLS="@comment "
SUB_FILES+= pkg-message${PKGMESSAGE_SUFFIX} mailer.conf.sample \
bootfiles.sed enable-qmail
SUB_LIST+= ECHO_CMD=${ECHO_CMD}
PKGINSTALL?= ${WRKDIR}/pkg-install
PKGMESSAGE?= ${WRKDIR}/pkg-message${PKGMESSAGE_SUFFIX}
DOCFILES+= ${WRKSRC_QMAIL}/BLURB ${WRKSRC_QMAIL}/BLURB2 ${WRKSRC_QMAIL}/BLURB3 \
${WRKSRC_QMAIL}/BLURB4 ${WRKSRC_QMAIL}/INTERNALS ${WRKSRC_QMAIL}/SECURITY \
${WRKSRC_QMAIL}/THOUGHTS ${FILESDIR}/PORT_NOTES \
${FILESDIR}/PORT_NOTES_FreeBSD_40-RELEASE \
${WRKDIR}/mailer.conf.sample \
${WRKSRC_QMAIL}/FAQ ${WRKSRC_QMAIL}/UPGRADE ${WRKSRC_QMAIL}/SENDMAIL \
${WRKSRC_QMAIL}/INSTALL ${WRKSRC_QMAIL}/INSTALL.alias \
${WRKSRC_QMAIL}/INSTALL.ctl ${WRKSRC_QMAIL}/INSTALL.ids \
${WRKSRC_QMAIL}/INSTALL.maildir ${WRKSRC_QMAIL}/INSTALL.mbox \
${WRKSRC_QMAIL}/INSTALL.vsm ${WRKSRC_QMAIL}/TEST.deliver \
${WRKSRC_QMAIL}/TEST.receive ${WRKSRC_QMAIL}/REMOVE.sendmail \
${WRKSRC_QMAIL}/REMOVE.binmail ${WRKSRC_QMAIL}/PIC.local2alias \
${WRKSRC_QMAIL}/PIC.local2ext ${WRKSRC_QMAIL}/PIC.local2local \
${WRKSRC_QMAIL}/PIC.local2rem ${WRKSRC_QMAIL}/PIC.local2virt \
${WRKSRC_QMAIL}/PIC.nullclient ${WRKSRC_QMAIL}/PIC.relaybad \
${WRKSRC_QMAIL}/PIC.relaygood ${WRKSRC_QMAIL}/PIC.rem2local
CONFIGUREPROGS= ${WRKSRC_QMAIL}/install ${WRKSRC_QMAIL}/dnsfq ${WRKSRC_QMAIL}/hostname \
${WRKSRC_QMAIL}/dnsip ${WRKSRC_QMAIL}/ipmeprint ${WRKSRC_QMAIL}/dnsptr
CONFIGUREFILES= ${WRKSRC_QMAIL}/config ${WRKSRC_QMAIL}/config-fast
BOOTFILES= home home+df proc proc+df binm1 binm1+df \
binm2 binm2+df binm3 binm3+df maildir maildir+vida
TCPSERVER_DB_DIR= ${PREFIX}/cdb/tcp.smtp.cdb
.if (${PREFIX} != ${LOCALBASE})
DOCSDIR= ${PREFIX}/doc
.endif
NO_MTREE= yes
OPTIONS+= QMAILQUEUE_PATCH "run a QMAILQUEUE program" off
OPTIONS+= BIG_CONCURRENCY_PATCH "use a concurrency greater than 240" off
OPTIONS+= OUTGOINGIP_PATCH "set the IP address to send messages" off
OPTIONS+= LOCALTIME_PATCH "emit dates in the local timezone" off
OPTIONS+= MAILDIRQUOTA_PATCH "Maildir++ support" off
OPTIONS+= BLOCKEXEC_PATCH "block many windows viruses/worms" off
OPTIONS+= DISCBOUNCES_PATCH "discard double-bounces" off
OPTIONS+= RELAY_REJECT_PATCH "generated by so-called anti-spammers" off
OPTIONS+= RCDLINK "create rc.d/qmail.sh" on
OPTIONS+= TCPSERVER_MAN "install tcpserver man pages" on
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
BROKEN= Does not compile on !i386
.endif
MAN1_QMAIL= forward.1 condredirect.1 bouncesaying.1 except.1 maildirmake.1 \
maildir2mbox.1 maildirwatch.1 mailsubj.1 qreceipt.1 qbiff.1 preline.1 \
tcp-env.1
MAN5_QMAIL= addresses.5 envelopes.5 maildir.5 mbox.5 dot-qmail.5 qmail-control.5 \
qmail-header.5 qmail-log.5 qmail-users.5 tcp-environ.5
MAN7_QMAIL= forgeries.7 qmail-limits.7 qmail.7
MAN8_QMAIL= qmail-local.8 qmail-lspawn.8 qmail-getpw.8 qmail-remote.8 \
qmail-rspawn.8 qmail-clean.8 qmail-send.8 qmail-start.8 splogger.8 \
qmail-queue.8 qmail-inject.8 qmail-showctl.8 qmail-newmrh.8 \
qmail-newu.8 qmail-pw2u.8 qmail-qread.8 qmail-qstat.8 qmail-tcpok.8 \
qmail-tcpto.8 qmail-pop3d.8 qmail-popup.8 qmail-qmqpc.8 qmail-qmqpd.8 \
qmail-qmtpd.8 qmail-smtpd.8 qmail-command.8
.for i in 1 5 7 8
MAN${i}+=${MAN${i}_QMAIL}
.endfor
PATCH_SITES+= ${MASTER_SITE_QMAIL}
PATCH_SITES+= http://www.ckdhr.com/ckd/:dns
PATCH_SITES+= ${MASTER_SITE_LOCAL:S/$/:dns/}
PATCHFILES+= qmail-103.patch:dns
PATCH_SITE_SUBDIR+= lioux/:dns
PATCH_DIST_STRIP+= -p1
.if defined(WITH_QMAILQUEUE_PATCH)
PATCHFILES+= qmailqueue-patch
.endif
.if defined(WITH_BIG_CONCURRENCY_PATCH)
PATCHFILES+= big-concurrency.patch
WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT?= 509
.endif
.if defined(WITH_OUTGOINGIP_PATCH)
PATCHFILES+= outgoingip.patch
.endif
.if defined(WITH_LOCALTIME_PATCH)
PATCH_SITES+= http://www.alib.jp/files/:localtime
PATCHFILES+= qmail-date-localtime.patch:localtime
.endif
.if defined(WITH_MAILDIRQUOTA_PATCH)
PATCH_SITES+= http://www.alexdupre.com/qmail/:quota
PATCHFILES+= qmail-maildir++.patch:quota
.endif
.if defined(WITH_BLOCKEXEC_PATCH) && !defined(BARRIER_BLOCKEXEC_PATCH)
PATCH_SITES+= http://www.alexdupre.com/qmail/:blockexec
PATCHFILES+= qmail-block-executables.patch:blockexec
.endif
.if defined(WITH_DISCBOUNCES_PATCH) && !defined(BARRIER_DISCBOUNCES_PATCH)
PATCH_SITES+= http://www.alexdupre.com/qmail/:doublebounce
PATCHFILES+= qmail-discard-double-bounces.patch:doublebounce
.endif
.if defined(WITH_RELAY_REJECT_PATCH)
PATCHFILES+= qmail-smtpd-relay-reject
.endif
.if defined(WITH_RCDLINK)
PLIST_SUB+= RCDLINK=""
RCDLINK=
.else
PLIST_SUB+= RCDLINK="@comment "
RCDLINK= \#
.endif
.if defined(WITH_TCPSERVER_MAN)
MASTER_SITES+= http://smarden.org/pape/djb/manpages/:1
DISTFILES+= ${DISTNAME_TCPSERVER}-man.tar.gz:1
MAN1_TCPSERVER=addcr.1 argv0.1 date@.1 delcr.1 finger@.1 fixcrio.1 \
http@.1 mconnect.1 rblsmtpd.1 recordio.1 tcpcat.1 \
tcpclient.1 tcprules.1 tcprulescheck.1 tcpserver.1 who@.1
MAN1+=${MAN1_TCPSERVER}
.endif
pre-everything::
.if !defined(BARRIER_BIG_CONCURRENCY_PATCH)
@${ECHO_MSG} ""
@${ECHO_MSG} "You may use the following build options:"
@${ECHO_MSG} ""
@${ECHO_MSG} "WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT=NUMBER"
@${ECHO_MSG} " (default NUMBER=${WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT})"
@${ECHO_MSG} " set this to a value reasonable for"
@${ECHO_MSG} " your system if you use the patch"
@${ECHO_MSG} ""
.endif
pre-patch:
cd ${WRKSRC} && make patch
post-patch:
@${REINPLACE_CMD} 's!/var/qmail!${PREFIX}!; \
s!/usr/local/!${LOCALBASE}/!' \
${WRKSRC_QMAIL}/Makefile
@${REINPLACE_CMD} 's!nofiles!qnofiles!g' \
${WRKSRC_QMAIL}/conf-groups
@${REINPLACE_CMD} '/"man"/d; /man\/man/d; /man\/cat/d; \
/"doc"/d; /"boot","/d' \
${WRKSRC_QMAIL}/hier.c
cd ${WRKSRC} && make copy
do-configure:
@${SED} -e 's,%%RCDLINK%%,${RCDLINK},g; s,%%LOCALBASE%%,${LOCALBASE},g' \
${FILESDIR}/pkg-install.in > ${WRKDIR}/pkg-install
@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC_QMAIL}/conf-cc
@${ECHO_CMD} ${PREFIX} > ${WRKSRC_QMAIL}/conf-qmail
.if defined(WITH_BIG_CONCURRENCY_PATCH) && defined(WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT)
@if [ ${WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT} -gt 0 ]; then \
${ECHO_CMD} "${WITH_BIG_CONCURRENCY_PATCH_CONCURRENCY_LIMIT}" \
> ${WRKSRC_QMAIL}/conf-spawn ; \
fi
.endif
@${ECHO_CMD} 'qnofiles' > ${WRKSRC_CHECKPASSWORD}/conf-groups
@${ECHO_CMD} 'cc -s -lcrypt' > ${WRKSRC_CHECKPASSWORD}/conf-ld
@${ECHO_CMD} ${PREFIX} >${WRKSRC_CHECKPASSWORD}/conf-home
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/vida/conf-cc
@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/src/vida/conf-home
@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/src/vida/conf-qmailhome
post-configure:
@${ECHO_CMD} ${PREFIX} > ${WRKSRC_TCPSERVER}/conf-home
@${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC_TCPSERVER}/conf-cc
@${ECHO_CMD} ${CC} -s > ${WRKSRC_TCPSERVER}/conf-ld
do-build:
@${ECHO_CMD} "=>Building" ${DISTNAME_QMAIL}
.for target in ${ALL_TARGET_QMAIL}
@cd ${WRKSRC_QMAIL} && make ${target}
.endfor
@${ECHO_CMD} "=>Building" ${DISTNAME_CHECKPASSWORD}
.for target in ${ALL_TARGET_CHECKPASSWORD}
@cd ${WRKSRC_CHECKPASSWORD} && make ${target}
.endfor
@${ECHO_CMD} "=>Building" ${DISTNAME_TCPSERVER}
.for target in ${ALL_TARGET_TCPSERVER}
@cd ${WRKSRC_TCPSERVER} && make ${target}
.endfor
do-install:
.for i in ${BOOTFILES}
@if [ -f ${WRKSRC_QMAIL}/${i}.sh ] ; then \
${SED} -f ${WRKDIR}/bootfiles.sed ${WRKSRC_QMAIL}/$i.sh > ${WRKDIR}/${i} ; \
elif [ -f ${FILESDIR}/${i}.in ] ; then \
${SED} -e 's,%%PREFIX%%,${PREFIX},g ; s,%%TCPSERVERDB%%,${TCPSERVER_DB_DIR},g ; s,%%ECHO_CMD%%,${ECHO_CMD},g' ${FILESDIR}/$i.in > ${WRKDIR}/${i} ; \
elif [ -f ${FILESDIR}/${i} ] ; then \
${SED} -f ${WRKDIR}/bootfiles.sed ${FILESDIR}/$i > ${WRKDIR}/${i} ; \
fi
.endfor
@${MKDIR} ${PREFIX}/configure
@cd ${WRKSRC_QMAIL} ; ./install
${INSTALL_PROGRAM} ${CONFIGUREPROGS} ${PREFIX}/configure
${INSTALL_SCRIPT} ${CONFIGUREFILES} ${PREFIX}/configure
.for i in ${BOOTFILES}
${INSTALL_SCRIPT} ${WRKDIR}/${i:T} ${PREFIX}/boot
.endfor
.for i in 1 5 7 8
@${MKDIR} ${PREFIX}/man/man$i
.for j in ${MAN${i}_QMAIL}
${INSTALL_MAN} ${WRKSRC_QMAIL}/$j ${PREFIX}/man/man${i}
.endfor
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
. if defined(PACKAGE_BUILDING)
@${ECHO_CMD} "FreeBSD Binary package qmail installation" \
> ${DOCSDIR}/SYSDEPS
. else
@cd ${WRKSRC_QMAIL} && ${CAT} `${CAT} SYSDEPS` \
> ${DOCSDIR}/SYSDEPS
. endif
.endif
@${MKDIR} ${PREFIX}/scripts
${INSTALL_SCRIPT} ${FILESDIR}/mkaliasdir ${PREFIX}/scripts
${INSTALL_SCRIPT} ${WRKDIR}/enable-qmail ${PREFIX}/scripts
.for script in ${SCRIPTS}
${INSTALL_SCRIPT} ${WRKDIR}/scripts/${script} ${PREFIX}/scripts
.endfor
@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
@cd ${WRKSRC_CHECKPASSWORD} && make setup
.for file_name in addcr argv0 delcr fixcrio mconnect-io rblsmtpd recordio tcpclient tcprules tcprulescheck tcpserver
@${INSTALL_PROGRAM} ${WRKSRC_TCPSERVER}/${file_name} ${PREFIX}/bin
.endfor
.for file_name in date@ finger@ http@ mconnect who@ tcpcat
@${INSTALL_SCRIPT} ${WRKSRC_TCPSERVER}/${file_name} ${PREFIX}/bin
.endfor
.if defined(WITH_TCPSERVER_MAN)
.for j in ${MAN1_TCPSERVER}
${INSTALL_MAN} ${WRKSRC_TCPSERVER}-man/${j} ${PREFIX}/man/man1/
.endfor
.endif
cd ${WRKSRC}/src/vida && make setup
cd ${WRKSRC} && make install-doc
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/checkpassword
. for f in CHANGES FILES README SYSDEPS TARGETS TODO VERSION
${INSTALL_DATA} ${WRKSRC_CHECKPASSWORD}/$f ${DOCSDIR}/checkpassword
. endfor
.endif
cd ${WRKSRC}/src/vida && make check
.include <bsd.port.post.mk>