From 389e88f48681baec42cd30af946ac1f69598d25a Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Fri, 30 Jan 2004 18:03:31 +0000 Subject: 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 --- mail/vpopmail/Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'mail/vpopmail') 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 .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 -- cgit v1.2.3