2000-10-11 16:08:28 +02:00
|
|
|
# New ports collection makefile for: qpopper
|
2000-11-01 11:20:38 +01:00
|
|
|
# Date created: 1 April 1995
|
|
|
|
# Whom: pst
|
1994-10-06 20:33:20 +01:00
|
|
|
#
|
1999-08-25 08:51:17 +02:00
|
|
|
# $FreeBSD$
|
1994-10-06 20:33:20 +01:00
|
|
|
#
|
|
|
|
|
2000-07-18 23:27:21 +02:00
|
|
|
PORTNAME= qpopper
|
2001-06-02 23:15:12 +02:00
|
|
|
PORTVERSION= 4.0.3
|
2001-09-10 02:06:05 +02:00
|
|
|
PORTREVISION= 1
|
2001-02-10 06:25:52 +01:00
|
|
|
CATEGORIES= mail ipv6
|
2001-05-10 06:30:43 +02:00
|
|
|
MASTER_SITES= ftp://ftp.qualcomm.com/eudora/servers/unix/popper/%SUBDIR%/ \
|
|
|
|
ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.qualcomm.com/eudora/servers/unix/popper/%SUBDIR%/
|
|
|
|
MASTER_SITE_SUBDIR= . old
|
2000-10-11 16:08:28 +02:00
|
|
|
DISTNAME= ${PORTNAME}${PORTVERSION}
|
1995-04-02 03:13:48 +02:00
|
|
|
|
2001-02-10 06:25:52 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-04-18 20:48:02 +02:00
|
|
|
.if ${OSVERSION} >= 400014
|
|
|
|
PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/
|
2001-06-03 01:31:06 +02:00
|
|
|
PATCHFILES= qpopper4.0.3-ipv6-20010504.diff.gz
|
2001-04-18 20:48:02 +02:00
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
.endif
|
2001-02-10 06:25:52 +01:00
|
|
|
|
2001-02-20 19:15:21 +01:00
|
|
|
MAINTAINER= lioux@FreeBSD.org
|
2000-11-01 11:20:38 +01:00
|
|
|
|
2001-05-06 05:34:23 +02:00
|
|
|
USE_AUTOCONF= yes
|
2000-07-18 23:27:21 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2000-11-01 11:20:38 +01:00
|
|
|
CONFIGURE_ENV= LIBS="-lmd -lutil" \
|
2000-12-11 04:17:04 +01:00
|
|
|
OS_DEFS="-DSETPROCTITLE ${OS_DEFS}"
|
2000-10-11 16:08:28 +02:00
|
|
|
CONFIGURE_ARGS= --enable-apop=${PREFIX}/etc/qpopper/pop.auth \
|
2001-10-05 05:48:34 +02:00
|
|
|
--enable-nonauth-file=${POPUSERS_FILE} \
|
2001-05-06 05:34:23 +02:00
|
|
|
--with-apopuid=pop --without-gdbm \
|
2000-11-01 11:20:38 +01:00
|
|
|
--enable-keep-temp-drop
|
1997-10-07 22:37:24 +02:00
|
|
|
|
2001-10-05 05:48:34 +02:00
|
|
|
PLIST_SUB= EPOPPASSD=${EPOPPASSD} \
|
|
|
|
POP_USER=${POP_USER} \
|
|
|
|
POP_GROUP=${POP_GROUP} \
|
|
|
|
POP_MODE_DIR=${POP_MODE_DIR} \
|
|
|
|
POP_MODE_CONF=${POP_MODE_CONF}
|
2001-05-06 05:34:23 +02:00
|
|
|
|
2000-12-11 04:17:04 +01:00
|
|
|
MAN8= qpopauth.8 qpopper.8
|
|
|
|
|
2001-10-05 05:48:34 +02:00
|
|
|
# internal configuration
|
|
|
|
POP_USER= pop
|
|
|
|
POP_GROUP= daemon
|
|
|
|
POP_MODE_DIR= 0711
|
|
|
|
POP_MODE_CONF= 0444
|
|
|
|
POPUSERS_FILE= ${PREFIX}/etc/qpopper/popusers
|
|
|
|
SAMPLE_EXT= .sample
|
|
|
|
#
|
|
|
|
PKGDEINSTALL= ${PKGINSTALL}
|
|
|
|
|
|
|
|
pre-everything::
|
2000-12-11 04:17:04 +01:00
|
|
|
.if defined(APOP_ONLY)
|
2001-05-06 05:34:23 +02:00
|
|
|
@${ECHO_MSG} "==> The APOP_ONLY option is deprecated, please use"
|
|
|
|
@${ECHO_MSG} " WITH_APOP_ONLY instead."
|
|
|
|
@${ECHO_MSG} "==> The APOP_ONLY option will work in this version but"
|
|
|
|
@${ECHO_MSG} " not on future ones."
|
|
|
|
.endif
|
|
|
|
.if defined(FULL_POPD_DEBUG)
|
|
|
|
@${ECHO_MSG} "==> The FULL_POPD_DEBUG option is deprecated, please"
|
|
|
|
@${ECHO_MSG} " use WITH_FULL_POPD_DEBUG instead."
|
|
|
|
@${ECHO_MSG} "==> The FULL_POPD_DEBUG option will work in this version but"
|
|
|
|
@${ECHO_MSG} " not on future ones."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "You may use the following build options:"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "WITH_APOP_ONLY=yes builds with APOP authentication only"
|
|
|
|
@${ECHO_MSG} "WITH_FULL_POPD_DEBUG=yes buils with more verbose debugging"
|
|
|
|
@${ECHO_MSG} "WITH_POPPASSD=yes builds the poppassd daemon"
|
2001-10-05 05:48:34 +02:00
|
|
|
@${ECHO_MSG} "WITH_SAMPLE_POPUSERS_FILE=yes builds a default (otherwise,"
|
|
|
|
@${ECHO_MSG} " use an empty file) reject file"
|
2001-05-06 05:34:23 +02:00
|
|
|
|
|
|
|
# If WITH_APOP_ONLY variable present in the environment, qpopper builds
|
|
|
|
# with APOP authentication only.
|
|
|
|
.if defined(APOP_ONLY) || defined(WITH_APOP_ONLY)
|
2000-12-11 04:17:04 +01:00
|
|
|
OS_DEFS+= -DAPOP_ONLY
|
1998-08-02 22:34:29 +02:00
|
|
|
.endif
|
1997-10-07 22:37:24 +02:00
|
|
|
|
2001-05-06 05:34:23 +02:00
|
|
|
# If WITH_FULL_POPD_DEBUG variable present in the environment, qpopper builds
|
2000-12-11 04:17:04 +01:00
|
|
|
# with more verbose debugging. See also -d option to qpopper
|
2001-05-06 05:34:23 +02:00
|
|
|
.if defined(FULL_POPD_DEBUG) || defined(WITH_FULL_POPD_DEBUG)
|
2000-12-11 04:17:04 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-debugging
|
|
|
|
.endif
|
1997-10-07 22:37:24 +02:00
|
|
|
|
2001-05-06 05:34:23 +02:00
|
|
|
# If WITH_POPPASSD variable present in the environment, qpopper builds
|
|
|
|
# with poppassd support.
|
|
|
|
.if defined(WITH_POPPASSD)
|
|
|
|
CONFIGURE_ARGS+= --enable-poppassd
|
2001-05-11 02:31:33 +02:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-password::poppassd.c
|
2001-05-06 05:34:23 +02:00
|
|
|
EPOPPASSD= ""
|
|
|
|
.else
|
|
|
|
EPOPPASSD= "@comment "
|
|
|
|
.endif
|
|
|
|
|
2001-04-17 09:53:49 +02:00
|
|
|
.if exists(/usr/lib/libssl.a) && exists(/usr/lib/libcrypto.a)
|
|
|
|
CONFIGURE_ARGS+= --with-openssl=/usr
|
|
|
|
.elif exists(${LOCALBASE}/lib/libssl.a) && exists(${LOCALBASE}/lib/libcrypto.a)
|
2001-05-28 14:39:02 +02:00
|
|
|
LIB_DEPENDS+= ssl.2:${PORTSDIR}/security/openssl
|
2001-04-17 09:53:49 +02:00
|
|
|
CONFIGURE_ARGS+= -with-includes=${LOCALBASE}/include/openssl --with-openssl=${LOCALBASE}
|
2001-04-18 21:12:11 +02:00
|
|
|
CONFIGURE_ENV+= RSAGLUE="${RSAGLUE}"
|
|
|
|
.if exists(${LOCALBASE}/lib/librsaref.a)
|
|
|
|
RSAGLUE= -lrsaref
|
|
|
|
.endif
|
|
|
|
RSAGLUE+= -lRSAglue
|
2001-04-17 09:53:49 +02:00
|
|
|
.endif
|
|
|
|
|
2000-07-19 09:31:26 +02:00
|
|
|
post-patch:
|
2000-12-11 04:17:04 +01:00
|
|
|
@${RM} -f ${WRKSRC}/popper/md5.h
|
2000-11-01 11:20:38 +01:00
|
|
|
@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/man/*
|
2001-05-06 05:34:23 +02:00
|
|
|
.if defined(WITH_POPPASSD)
|
|
|
|
@${PERL} -pi -ne "s|/usr/bin/smbpasswd|${PREFIX}/bin/smbpasswd|" \
|
|
|
|
${WRKSRC}/password/poppassd.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@(cd ${WRKSRC}; ${CHMOD} u+w configure*)
|
2000-07-19 09:31:26 +02:00
|
|
|
|
|
|
|
do-install:
|
2000-12-11 04:17:04 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/popper/popauth ${PREFIX}/bin/qpopauth
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${PREFIX}/libexec/qpopper
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${MANPREFIX}/man/man8/qpopauth.8
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${MANPREFIX}/man/man8/qpopper.8
|
2000-11-01 11:20:38 +01:00
|
|
|
${LN} -sf ${PREFIX}/bin/qpopauth ${PREFIX}/bin/qapopauth
|
2001-05-06 05:34:23 +02:00
|
|
|
.if defined(WITH_POPPASSD)
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${PREFIX}/libexec/qpoppassd
|
|
|
|
.endif
|
2001-10-05 05:48:34 +02:00
|
|
|
@${INSTALL} -d -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_DIR} \
|
|
|
|
${PREFIX}/etc/${PORTNAME}
|
2000-11-01 11:20:38 +01:00
|
|
|
|
2001-10-05 05:48:34 +02:00
|
|
|
post-install: install-conf-file
|
2000-12-11 04:17:04 +01:00
|
|
|
@${SED} -e "s:/usr/local:${PREFIX}:g" ${PKGMESSAGE}
|
1997-10-07 22:37:24 +02:00
|
|
|
|
2001-10-05 05:48:34 +02:00
|
|
|
# based on original from op port, written by Cyrille Lefevre
|
|
|
|
# <clefevre@citeweb.net>
|
|
|
|
install-conf-file:
|
|
|
|
@if [ ! -f ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} ]; then \
|
|
|
|
if [ -f /etc/ftpusers ] && [ -n "${WITH_SAMPLE_POPUSERS_FILE}" ]; then \
|
|
|
|
${INSTALL} -c -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_CONF} \
|
|
|
|
/etc/ftpusers ${POPUSERS_FILE}${SAMPLE_EXT} ; \
|
|
|
|
else \
|
|
|
|
${CP} /dev/null ${POPUSERS_FILE}${SAMPLE_EXT} ; \
|
|
|
|
${CHOWN} ${POP_USER}:${POP_GROUP} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
|
|
|
|
${CHMOD} ${POP_MODE_CONF} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
|
|
|
|
fi ; \
|
|
|
|
fi
|
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
|
|
|
|
${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
|
2001-02-10 06:25:52 +01:00
|
|
|
.include <bsd.port.post.mk>
|