mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
- conversion to rc_subr and OPTIONS style
PR: 100773 Submitted by: marck (Dmitry Morozovsky) - keep compatibility checks - make optiosn overriadeabel flor slave ports - force UNIQUENAME to avoid conflichts between ports
This commit is contained in:
parent
9564645b97
commit
2589e2491c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=168713
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user