diff options
Diffstat (limited to 'mail/popa3d')
-rw-r--r-- | mail/popa3d/Makefile | 37 | ||||
-rw-r--r-- | mail/popa3d/files/popa3d.sh | 26 | ||||
-rw-r--r-- | mail/popa3d/pkg-plist | 2 |
3 files changed, 40 insertions, 25 deletions
diff --git a/mail/popa3d/Makefile b/mail/popa3d/Makefile index 1486a1651940..9bed51d2d32c 100644 --- a/mail/popa3d/Makefile +++ b/mail/popa3d/Makefile @@ -7,6 +7,7 @@ PORTNAME= popa3d PORTVERSION= 1.0.2 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.openwall.com/popa3d/ \ ftp://ftp.openwall.com/pub/projects/popa3d/ @@ -19,7 +20,22 @@ ALL_TARGET= popa3d MAN8= popa3d.8 PLIST= ${WRKDIR}/.PLIST.more CFLAGS+= -DPREFIX=${PREFIX} +UNIQUENAME= ${.CURDIR:T} + +OPTIONS?= STANDALONE_POP3 "Unattended server mode" off \ + SMTP_AFTER_POP3 "Enable SMTP-after-POP mode" off + +.include <bsd.port.pre.mk> + +# honor old flags .if defined(STANDALONE_POP3) +WITH_STANDALONE_POP3= yes +.endif +.if defined(SMTP_AFTER_POP3) +WITH_SMTP_AFTER_POP3= yes +.endif + +.if defined(WITH_STANDALONE_POP3) STANDALONE_SUFFIX= -standalone PLIST_SUB+= STANDALONE_POP3="" CONFLICTS?= popa3d-0.* popa3d-before-sendmail-0.* @@ -28,7 +44,8 @@ PKGDEINSTALL= ${NONEXISTENT} .else PLIST_SUB+= STANDALONE_POP3="@comment " .endif -.if defined(SMTP_AFTER_POP3) + +.if defined(WITH_SMTP_AFTER_POP3) SMTP_AFTER_POP3_SUFFIX= -before-sendmail EXTRA_PATCHES+= ${FILESDIR}/pop-before-sendmail.patch PLIST_SUB+= SMTP_AFTER_POP3="" @@ -38,7 +55,7 @@ PLIST_SUB+= SMTP_AFTER_POP3="@comment " CONFLICTS?= popa3d-standalone-0.* popa3d-before-sendmail-0.* .endif -.if defined(STANDALONE_POP3) +.if defined(WITH_STANDALONE_POP3) post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/popa3d.sh \ > ${WRKSRC}/popa3d.sh @@ -52,11 +69,11 @@ pre-configure: @${ECHO_CMD} "@exec ${MKDIR} %D/empty" >>${PLIST} @${ECHO_CMD} "@dirrm empty" >>${PLIST} .endif -.if defined(SMTP_AFTER_POP3) +.if defined(WITH_SMTP_AFTER_POP3) @${ECHO_CMD} "@cwd ${CFDIR}" >>${PLIST} @${ECHO_CMD} "hack/popauth.m4" >>${PLIST} .endif -.if defined(STANDALONE_POP3) +.if defined(WITH_STANDALONE_POP3) @${REINPLACE_CMD} -e 's|^\(#define POP_STANDALONE\).*|\1 1|' \ ${WRKSRC}/params.h .endif @@ -75,28 +92,26 @@ do-install: ${INSTALL} ${COPY} -o root -g wheel -m 500 \ ${WRKSRC}/popa3d ${PREFIX}/libexec/popa3d ${INSTALL_MAN} ${WRKSRC}/popa3d.8 ${MANPREFIX}/man/man8/ -.if defined(SMTP_AFTER_POP3) +.if defined(WITH_SMTP_AFTER_POP3) ${INSTALL_DATA} ${FILESDIR}/popauth.m4 ${CFDIR}/hack/ .endif -.if defined(STANDALONE_POP3) - ${INSTALL_DATA} ${WRKSRC}/popa3d.sh ${PREFIX}/etc/rc.d/popa3d.sh-dist +.if defined(WITH_STANDALONE_POP3) + ${INSTALL_SCRIPT} ${WRKSRC}/popa3d.sh ${PREFIX}/etc/rc.d/ .endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_MAN} ${WRKSRC}/DESIGN ${DOCSDIR}/ ${INSTALL_MAN} ${WRKSRC}/LICENSE ${DOCSDIR}/ -.if defined(SMTP_AFTER_POP3) +.if defined(WITH_SMTP_AFTER_POP3) ${INSTALL_DATA} ${FILESDIR}/POPAUTH ${DOCSDIR}/ .endif .endif -.if !defined(STANDALONE_POP3) +.if !defined(WITH_STANDALONE_POP3) post-install: @ ${CAT} ${PKGMESSAGE} .endif -.include <bsd.port.pre.mk> - .if exists(${LOCALBASE}/share/sendmail/cf/mailer/uucp.m4) CFDIR= ${LOCALBASE}/share/sendmail/cf .else diff --git a/mail/popa3d/files/popa3d.sh b/mail/popa3d/files/popa3d.sh index 824a7625dcb3..d49a811e2630 100644 --- a/mail/popa3d/files/popa3d.sh +++ b/mail/popa3d/files/popa3d.sh @@ -1,16 +1,16 @@ #!/bin/sh -case "$1" in -start) - [ -x %%PREFIX%%/libexec/popa3d ] && %%PREFIX%%/libexec/popa3d -D && echo -n ' popa3d' - ;; -stop) - killall popa3d - ;; -*) - echo "Usage: ${0##*/}: { start | stop }" >&2 - exit 64 - ;; -esac +# PROVIDE: popa3d +# REQUIRE: LOGIN cleanvar + +. /etc/rc.subr + +name="popa3d" +rcvar=`set_rcvar` + +command="%%PREFIX%%/libexec/${name}" +flags="-D" + +load_rc_config $name +run_rc_command "$1" -exit 0 diff --git a/mail/popa3d/pkg-plist b/mail/popa3d/pkg-plist index 17c25cd1fe07..fd8496babede 100644 --- a/mail/popa3d/pkg-plist +++ b/mail/popa3d/pkg-plist @@ -1,4 +1,4 @@ -%%STANDALONE_POP3%%etc/rc.d/popa3d.sh-dist +%%STANDALONE_POP3%%etc/rc.d/popa3d.sh libexec/popa3d %%PORTDOCS%%%%DOCSDIR%%/DESIGN %%PORTDOCS%%%%DOCSDIR%%/LICENSE |