diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2003-12-04 03:28:54 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2003-12-04 03:28:54 +0000 |
commit | bb8719d37f7b8d4d2285a1b79050256c0f9bbe8f (patch) | |
tree | 8431dc110f11991da6fa68fc66ef3ed678f87603 /mail | |
parent | 12fc4ace75f3dffb8d1f5fad5c3229fa02cef27f (diff) | |
download | ports-bb8719d37f7b8d4d2285a1b79050256c0f9bbe8f.tar.gz ports-bb8719d37f7b8d4d2285a1b79050256c0f9bbe8f.zip |
Notes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/popa3d/Makefile | 37 | ||||
-rw-r--r-- | mail/popa3d/files/popa3d.sh | 16 | ||||
-rw-r--r-- | mail/popa3d/pkg-plist | 9 |
3 files changed, 48 insertions, 14 deletions
diff --git a/mail/popa3d/Makefile b/mail/popa3d/Makefile index 4bd8db762116..3675d7061229 100644 --- a/mail/popa3d/Makefile +++ b/mail/popa3d/Makefile @@ -13,10 +13,14 @@ MASTER_SITES= http://www.openwall.com/popa3d/ \ .if defined(SMTP_AFTER_POP3) PKGNAMESUFFIX?= -before-sendmail .endif +.if defined(STANDALONE_POP3) +PKGNAMESUFFIX?= -standalone +.endif MAINTAINER= dinoex@FreeBSD.org COMMENT= Secure, performance, tiny POP3 daemon +USE_REINPLACE= yes ALL_TARGET= popa3d MAN8= popa3d.8 PLIST= ${WRKDIR}/.PLIST.more @@ -27,10 +31,23 @@ PLIST_SUB+= SMTP_AFTER_POP3="" .else PLIST_SUB+= SMTP_AFTER_POP3="@comment " .endif +.if defined(STANDALONE_POP3) +PLIST_SUB+= STANDALONE_POP3="" +.else +PLIST_SUB+= STANDALONE_POP3="@comment " +.endif + +.if defined(STANDALONE_POP3) +post-extract: + @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/popa3d.sh \ + > ${WRKSRC}/popa3d.sh +.endif pre-configure: @${CAT} ${PKGDIR}/pkg-plist >${PLIST} .if !exists(/var/empty) + @${REINPLACE_CMD} -e "s=/var/empty=${PREFIX}/empty=" \ + ${WRKSRC}/params.h @${ECHO_CMD} "@exec ${MKDIR} %D/empty" >>${PLIST} @${ECHO_CMD} "@dirrm empty" >>${PLIST} .endif @@ -38,12 +55,9 @@ pre-configure: @${ECHO_CMD} "@cwd ${CFDIR}" >>${PLIST} @${ECHO_CMD} "hack/popauth.m4" >>${PLIST} .endif - -.if !exists(/var/empty) -pre-patch: - @${MV} ${WRKSRC}/params.h ${WRKSRC}/params.h.sed - ${SED} -e "s=/var/empty=${PREFIX}/empty=" \ - ${WRKSRC}/params.h.sed > ${WRKSRC}/params.h +.if defined(STANDALONE_POP3) + @${REINPLACE_CMD} -e 's|^\(#define POP_STANDALONE\).*|\1 1|' \ + ${WRKSRC}/params.h .endif pre-install: @@ -59,12 +73,15 @@ do-install: .if defined(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 +.endif .if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/popa3d - ${INSTALL_MAN} ${WRKSRC}/DESIGN ${PREFIX}/share/doc/popa3d - ${INSTALL_MAN} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/popa3d + ${MKDIR} ${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/DESIGN ${DOCSDIR}/ + ${INSTALL_MAN} ${WRKSRC}/LICENSE ${DOCSDIR}/ .if defined(SMTP_AFTER_POP3) - ${INSTALL_DATA} ${FILESDIR}/POPAUTH ${PREFIX}/share/doc/popa3d + ${INSTALL_DATA} ${FILESDIR}/POPAUTH ${DOCSDIR}/ .endif .endif diff --git a/mail/popa3d/files/popa3d.sh b/mail/popa3d/files/popa3d.sh new file mode 100644 index 000000000000..824a7625dcb3 --- /dev/null +++ b/mail/popa3d/files/popa3d.sh @@ -0,0 +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 + +exit 0 diff --git a/mail/popa3d/pkg-plist b/mail/popa3d/pkg-plist index 2c7325249877..1a55e78dc596 100644 --- a/mail/popa3d/pkg-plist +++ b/mail/popa3d/pkg-plist @@ -1,6 +1,7 @@ @comment $FreeBSD$ +%%STANDALONE_POP3%%etc/rc.d/popa3d.sh-dist libexec/popa3d -%%PORTDOCS%%share/doc/popa3d/DESIGN -%%PORTDOCS%%share/doc/popa3d/LICENSE -%%SMTP_AFTER_POP3%%%%PORTDOCS%%share/doc/popa3d/POPAUTH -%%PORTDOCS%%@dirrm share/doc/popa3d +%%PORTDOCS%%%%DOCSDIR%%/DESIGN +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%SMTP_AFTER_POP3%%%%PORTDOCS%%%%DOCSDIR%%/POPAUTH +%%PORTDOCS%%@dirrm %%DOCSDIR%% |