diff options
author | Peter Pentchev <roam@FreeBSD.org> | 2004-01-30 18:03:31 +0000 |
---|---|---|
committer | Peter Pentchev <roam@FreeBSD.org> | 2004-01-30 18:03:31 +0000 |
commit | 389e88f48681baec42cd30af946ac1f69598d25a (patch) | |
tree | e5418023a6963c1e599782242afcaea1a1654bb7 | |
parent | b6817f988cbcf590edef6e04f9c2750c7ec2f9f3 (diff) | |
download | ports-389e88f48681baec42cd30af946ac1f69598d25a.tar.gz ports-389e88f48681baec42cd30af946ac1f69598d25a.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>
Notes
Notes:
svn path=/head/; revision=99527
-rw-r--r-- | mail/vpopmail-devel/Makefile | 29 | ||||
-rw-r--r-- | mail/vpopmail/Makefile | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/mail/vpopmail-devel/Makefile b/mail/vpopmail-devel/Makefile index 26e24b44deba..002e545926fc 100644 --- a/mail/vpopmail-devel/Makefile +++ b/mail/vpopmail-devel/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 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 |