aboutsummaryrefslogtreecommitdiffstats
path: root/mail/vpopmail
diff options
context:
space:
mode:
authorroam <roam@FreeBSD.org>2004-01-31 02:03:31 +0800
committerroam <roam@FreeBSD.org>2004-01-31 02:03:31 +0800
commitb670c8ca1558d38fa45908ce153a3c46ed75c0b1 (patch)
tree69db9496f772067ecff576c7bedd7ac86b4beec5 /mail/vpopmail
parentd3f28a868afda1abd55d1e3eb2ad8311c5771866 (diff)
downloadfreebsd-ports-gnome-b670c8ca1558d38fa45908ce153a3c46ed75c0b1.tar.gz
freebsd-ports-gnome-b670c8ca1558d38fa45908ce153a3c46ed75c0b1.tar.zst
freebsd-ports-gnome-b670c8ca1558d38fa45908ce153a3c46ed75c0b1.zip
A first shot at enabling the PostgreSQL authentication features, only
loosely based on the PR mentioned (the original patch in the PR does not handle either library dependencies nor changing the default credentials). PORTREVISION *not* bumped, this can wait until I implement WITH_PGSQL_PASS and WITH_PGSQL_SERVER in the near future. PR: 61998 Submitted by: Sascha Luck <sascha@c4inet.net>
Diffstat (limited to 'mail/vpopmail')
-rw-r--r--mail/vpopmail/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/mail/vpopmail/Makefile b/mail/vpopmail/Makefile
index 26e24b44deba..002e545926fc 100644
--- a/mail/vpopmail/Makefile
+++ b/mail/vpopmail/Makefile
@@ -45,6 +45,7 @@ CONFIGURE_ARGS= --enable-qmaildir=${QMAIL_DIR} \
# WITH_MYSQL - allow authentitation via mysql
# WITH_MYSQL_REPLICATION - enables MySQL database replication
# WITH_MYSQL_LIMITS - enables the MySQL mailbox limit code
+# WITH_PGSQL - allow authentication via PostgreSQL
# WITH_SYBASE - allow authentication via Sybase (NOT TESTED!)
# WITH_ORACLE - allow authentication via Oracle (NOT TESTED!)
# WITH_VALIAS - enable valias processing
@@ -70,6 +71,7 @@ CONFIGURE_ARGS= --enable-qmaildir=${QMAIL_DIR} \
# v - verbose success and errors with passwords
# WITHOUT_AUTH_LOG - disables authentication logging
# WITH_MYSQL_LOG - enable logging to a MySQL database
+# WITH_PGSQL_LOG - enable logging to a PostgreSQL database
# QMAIL_DIR - location of qmail directory
# PREFIX - installation area for vpopmail (see comment below)
# VCHKPW_GID - the group ID of the new vchkpw group (89)
@@ -89,6 +91,11 @@ CONFIGURE_ARGS= --enable-qmaildir=${QMAIL_DIR} \
# WITH_MYSQL_UPDATE_SERVER, WITH_MYSQL_UPDATE_USER, WITH_MYSQL_UPDATE_PASSWD
# Those variables, if defined, override WITH_MYSQL_{SERVER,USER,PASSWD}
#
+# PostgreSQL database configuration options
+#
+# WITH_PGSQL_USER - the username for connecting to the PostgreSQL server (postgres)
+# WITH_PGSQL_DB - the name of the PostgreSQL database to use (vpopmail)
+#
# Oracle database configuration options
#
# WARNING: This is NOT TESTED, not in the least.
@@ -147,6 +154,20 @@ WITH_MYSQL_UPDATE_PASSWD?= ${WITH_MYSQL_PASSWD}
WITH_MYSQL_DB?= vpopmail
.endif
+.if defined(WITH_POSTGRESQL)
+WITH_PGSQL= yes
+.endif
+
+.if defined(WITH_PGSQL)
+POSTGRESQL_PORT?= databases/postgresql-client
+LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+CONFIGURE_ARGS+= --enable-postgres=y
+
+.if defined(WITH_PGSQL_LOG)
+CONFIGURE_ARGS+= --enable-pgsql-logging=y
+.endif
+.endif
+
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/qmail/bin/qmail-send)
@@ -263,6 +284,14 @@ post-patch:
pre-configure:
@PKG_PREFIX=${PREFIX}/vpopmail ${PERL5} ${PKGINSTALL}
+.if defined(WITH_PGSQL)
+.if defined(WITH_PGSQL_DB)
+ ${REINPLACE_CMD} -E -e "s/(#define DB.*)vpopmail(.*)/\1${WITH_PGSQL_DB}\2/" ${WRKSRC}/vpgsql.h
+.endif
+.if defined(WITH_PGSQL_USER)
+ ${REINPLACE_CMD} -E -e "s/(#define PG_CONNECT.*)postgres(.*)/\1${WITH_PGSQL_USER}\2/" ${WRKSRC}/vpgsql.h
+.endif
+.endif
.if defined(WITH_ORACLE)
.if defined(WITH_ORACLE_SERVICE)
${REINPLACE_CMD} -E -e "s/(#define ORACLE_SERVICE.*)jimmy(.*)/\1${WITH_ORACLE_SERVICE}\2/" ${WRKSRC}/voracle.h