Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Apr 2014 21:39:09 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350171 - in head/mail/drac: . files
Message-ID:  <201404042139.s34Ld9YX007748@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Fri Apr  4 21:39:08 2014
New Revision: 350171
URL: http://svnweb.freebsd.org/changeset/ports/350171
QAT: https://qat.redports.org/buildarchive/r350171/

Log:
  - Add stage support
  - Reorganize option support
  
  PR:		ports/187438
  Submitted by:	Takefu <takefu@airport.fm>

Deleted:
  head/mail/drac/pkg-plist
Modified:
  head/mail/drac/Makefile
  head/mail/drac/files/dracd.in
  head/mail/drac/files/patch-aa

Modified: head/mail/drac/Makefile
==============================================================================
--- head/mail/drac/Makefile	Fri Apr  4 21:35:43 2014	(r350170)
+++ head/mail/drac/Makefile	Fri Apr  4 21:39:08 2014	(r350171)
@@ -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
+
+.if defined(WITH_TI_RPC)
+DEFS+=	-DTI_RPC
+.else
+DEFS+=	-DSOCK_RPC
 .endif
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+.if defined(WITH_FOREGROUND)
+DEFS+=	-DRPC_SVC_FG
+.endif
 
-MAKE_ARGS+=	-DWITH_TI_RPC
+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>

Modified: head/mail/drac/files/dracd.in
==============================================================================
--- head/mail/drac/files/dracd.in	Fri Apr  4 21:35:43 2014	(r350170)
+++ head/mail/drac/files/dracd.in	Fri Apr  4 21:39:08 2014	(r350171)
@@ -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

Modified: head/mail/drac/files/patch-aa
==============================================================================
--- head/mail/drac/files/patch-aa	Fri Apr  4 21:35:43 2014	(r350170)
+++ head/mail/drac/files/patch-aa	Fri Apr  4 21:39:08 2014	(r350171)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404042139.s34Ld9YX007748>