diff options
author | dinoex <dinoex@FreeBSD.org> | 2003-12-04 11:28:54 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2003-12-04 11:28:54 +0800 |
commit | 7b7b040eb39f375255428d63992fee3193157108 (patch) | |
tree | 6d0736d03bd053646d1c6e3c8aca17b9909bf4f2 /mail | |
parent | 4f40a42f17e8f4e09816f7f023ed6bf990668b27 (diff) | |
download | freebsd-ports-gnome-7b7b040eb39f375255428d63992fee3193157108.tar.gz freebsd-ports-gnome-7b7b040eb39f375255428d63992fee3193157108.tar.zst freebsd-ports-gnome-7b7b040eb39f375255428d63992fee3193157108.zip |
- use DOCSDIR
- new option STANDALONE_POP3
Submitted by: osa
- USE_REINPLACE for all options
- cleanup targets
Submitted by: dinoex
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%% |