diff options
author | rene <rene@FreeBSD.org> | 2014-04-05 05:39:08 +0800 |
---|---|---|
committer | rene <rene@FreeBSD.org> | 2014-04-05 05:39:08 +0800 |
commit | baa08e8f3101dca9e039164a6c55a0bd4a3bec38 (patch) | |
tree | 84bdebca4457d0a1b02b55acfc8c457a0c9e953b /mail | |
parent | fd31772230a1ca2ab82fb5ce267e55a9ba6406d4 (diff) | |
download | freebsd-ports-gnome-baa08e8f3101dca9e039164a6c55a0bd4a3bec38.tar.gz freebsd-ports-gnome-baa08e8f3101dca9e039164a6c55a0bd4a3bec38.tar.zst freebsd-ports-gnome-baa08e8f3101dca9e039164a6c55a0bd4a3bec38.zip |
- Add stage support
- Reorganize option support
PR: ports/187438
Submitted by: Takefu <takefu@airport.fm>
Diffstat (limited to 'mail')
-rw-r--r-- | mail/drac/Makefile | 77 | ||||
-rw-r--r-- | mail/drac/files/dracd.in | 2 | ||||
-rw-r--r-- | mail/drac/files/patch-aa | 37 | ||||
-rw-r--r-- | mail/drac/pkg-plist | 4 |
4 files changed, 61 insertions, 59 deletions
diff --git a/mail/drac/Makefile b/mail/drac/Makefile index 280c188afb5f..227b478c52de 100644 --- a/mail/drac/Makefile +++ b/mail/drac/Makefile @@ -14,36 +14,65 @@ EXTRACT_SUFX= .tar.Z MAINTAINER= ports@FreeBSD.org COMMENT= Dynamic Relay Authorization Control, a POP-before-SMTP implementation -MAKE_JOBS_UNSAFE= yes +PLIST_FILES= sbin/rpc.dracd include/drac.h lib/libdrac.a \ + etc/dracd.allow-sample -.if defined(WITH_POSTFIX_DB3) -LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 +USE_CSTD= gnu89 + +OPTIONS_DEFINE= DB +OPTIONS_RADIO= MUA +OPTIONS_RADIO_MUA= POSTFIX EXIM +POSTFIX_DESC= Use POSTFIX +EXIM_DESC= Use EXIM +DB_DESC= Use database with POSTFIX + +.include <bsd.port.options.mk> + +DEFS= -DWITH_TI_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C + +.if ${PORT_OPTIONS:MPOSTFIX} +DEFS+= -DTERM_KD +RUN_DEPENDS+= postfix:${PORTSDIR}/mail/postfix +.if ${PORT_OPTIONS:MDB} +USE_BDB= 41+ .endif -.if defined(WITH_POSTFIX_DB41) -LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 +.elif ${PORT_OPTIONS:MEXIM} +DEFS+= -DTERM_KD -DREQ_HASH -DCIDR_KEY +RUN_DEPENDS+= exim:${PORTSDIR}/mail/exim .endif NO_WRKSUBDIR= yes USE_RC_SUBR= dracd -.if !defined(NOPORTDOCS) -MAN3= dracauth.3 -MAN1= rpc.dracd.1 +.if ${PORT_OPTIONS:MDOCS} +PLIST_FILES+= man/man3/dracauth.3.gz man/man1/rpc.dracd.1.gz .endif -NO_STAGE= yes -.include <bsd.port.pre.mk> +.if defined(WITH_TI_RPC) +DEFS+= -DTI_RPC +.else +DEFS+= -DSOCK_RPC +.endif -MAKE_ARGS+= -DWITH_TI_RPC +.if defined(WITH_FOREGROUND) +DEFS+= -DRPC_SVC_FG +.endif + +MAKE_ARGS+= DEFS="${DEFS}" pre-everything:: +.if ${PORT_OPTIONS:MIPV6} + @${ECHO_MSG} "=============================================================" + @${ECHO_MSG} "It is IPv6 non-correspondence." + @${ECHO_MSG} "After it understands, it is possible to use it with IPv4." + @${ECHO_MSG} "=============================================================" + @${ECHO_MSG} +.endif @${ECHO_MSG} "=============================================================" @${ECHO_MSG} "For databases compatible with other MTAs than sendmail, use:" @${ECHO_MSG} - @${ECHO_MSG} "WITH_POSTFIX=yes (Postfix)" - @${ECHO_MSG} "WITH_POSTFIX_DB3=yes (Postfix with DB3 database maps)" - @${ECHO_MSG} "WITH_POSTFIX_DB41=yes (Postfix with DB41 database maps)" - @${ECHO_MSG} "WITH_EXIM=yes (Exim)" + @${ECHO_MSG} "mail/postfix" + @${ECHO_MSG} "mail/exim" @${ECHO_MSG} @${ECHO_MSG} "Define WITH_FOREGROUND to make the rpc.dracd daemon stay in" @${ECHO_MSG} "foreground instead of detaching itself. This breaks the" @@ -54,13 +83,15 @@ post-patch: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/rpc.dracd ${PREFIX}/sbin/ - @${INSTALL_DATA} ${WRKSRC}/drac.h ${PREFIX}/include/ - @${INSTALL_DATA} ${WRKSRC}/libdrac.a ${PREFIX}/lib/ - @${INSTALL_DATA} ${WRKSRC}/dracd.allow-sample ${PREFIX}/etc/ -.if !defined(NOPORTDOCS) - @${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/ - @${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1 + @${INSTALL_PROGRAM} ${WRKSRC}/rpc.dracd ${STAGEDIR}${PREFIX}/sbin/ + @${INSTALL_DATA} ${WRKSRC}/drac.h ${STAGEDIR}${PREFIX}/include/ + @${INSTALL_DATA} ${WRKSRC}/libdrac.a ${STAGEDIR}${PREFIX}/lib/ + @${INSTALL_DATA} ${WRKSRC}/dracd.allow-sample \ + ${STAGEDIR}${PREFIX}/etc/ +.if ${PORT_OPTIONS:MDOCS} + @${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${STAGEDIR}${PREFIX}/man/man3/ + @${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m \ + ${STAGEDIR}${PREFIX}/man/man1/rpc.dracd.1 .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/mail/drac/files/dracd.in b/mail/drac/files/dracd.in index 83054f707369..5d95021135b3 100644 --- a/mail/drac/files/dracd.in +++ b/mail/drac/files/dracd.in @@ -10,7 +10,7 @@ # dracd_enable (bool): Set it to "YES" to enable rpc.dracd. # Default is "NO". # dracd_flags (str): Set to "" by default. -# Extra flags passed to rpc.dracd. +# Extra flags passed to rpc.dracd. # . /etc/rc.subr diff --git a/mail/drac/files/patch-aa b/mail/drac/files/patch-aa index 048e2f9c96fc..6ca9088fb3dc 100644 --- a/mail/drac/files/patch-aa +++ b/mail/drac/files/patch-aa @@ -1,6 +1,6 @@ ---- Makefile.orig Mon Jan 13 05:45:12 2003 -+++ Makefile Wed Mar 1 10:27:04 2006 -@@ -5,9 +5,10 @@ +--- Makefile.orig 2003-01-12 21:45:12.000000000 +0100 ++++ Makefile 2014-04-04 23:35:46.000000000 +0200 +@@ -5,9 +5,11 @@ # Paths @@ -11,31 +11,16 @@ +EBIN = ${PREFIX}/sbin +MAN = ${PREFIX}/man/man +ETC_DIR = ${PREFIX}/etc ++DEFS = ${DEFS} # OS-Dependant settings -@@ -33,22 +34,46 @@ +@@ -33,22 +35,19 @@ # -DCIDR_KEY # keys in CIDR format # -DTERM_KD # keys and data nul-terminated -DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO -+.if defined(WITH_TI_RPC) -+DEFS+= -DTI_RPC -+.else -+DEFS+= -DSOCK_RPC -+.endif -+ -+.if defined(WITH_POSTFIX) || defined(WITH_POSTFIX_DB3) || defined(WITH_POSTFIX_DB41) -+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -+.elif defined(WITH_EXIM) -+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY -+.else -+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C -+.endif -+.if defined(WITH_FOREGROUND) -+DEFS+= -DRPC_SVC_FG -+.endif - +- # Compiler flags -CC = cc +CC? = cc @@ -54,17 +39,7 @@ -RPCGENFLAGS = -#RPCGENFLAGS = -C +TSTLIBS = -L. -ldrac -+#RPCGENFLAGS = +RPCGENFLAGS = -C -I -+ -+.if defined(WITH_POSTFIX_DB3) -+CFLAGS+= -I${LOCALBASE}/include/db3 -+LDLIBS+= -L${LOCALBASE}/lib -ldb3 -+.endif -+.if defined(WITH_POSTFIX_DB41) -+CFLAGS+= -I${LOCALBASE}/include/db41 -+LDLIBS+= -L${LOCALBASE}/lib -ldb41 -+.endif # Man sections MANLIB = 3 diff --git a/mail/drac/pkg-plist b/mail/drac/pkg-plist deleted file mode 100644 index a80bc412f0ec..000000000000 --- a/mail/drac/pkg-plist +++ /dev/null @@ -1,4 +0,0 @@ -sbin/rpc.dracd -include/drac.h -lib/libdrac.a -etc/dracd.allow-sample |