From 633ce6b98596d7334abda998f74568effefdff4c Mon Sep 17 00:00:00 2001 From: dwcjr Date: Mon, 26 Aug 2002 21:33:57 +0000 Subject: Add hooks to preselect postfix options Update TLS PR: 42047 Submitted by: maintainer, knu --- mail/postfix21/Makefile | 7 ++++ mail/postfix21/distinfo | 2 +- mail/postfix21/scripts/configure.postfix | 69 ++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 31 deletions(-) (limited to 'mail/postfix21') diff --git a/mail/postfix21/Makefile b/mail/postfix21/Makefile index c894d27..6b47f15 100644 --- a/mail/postfix21/Makefile +++ b/mail/postfix21/Makefile @@ -5,6 +5,12 @@ # $FreeBSD$ # +# To pre-select options in batch mode, run make like this: +# +# make -DBATCH POSTFIX_OPTIONS="DB3 PCRE" +# +# the options are the same names as in the scripts/configure.postfix file + PORTNAME= postfix PORTVERSION= 1.1.11 PORTEPOCH= 1 @@ -46,6 +52,7 @@ MAKEFILEFLAGS+= OPT="${CFLAGS}" SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ TOUCH="${TOUCH}" \ MKDIR="${MKDIR}" \ + POSTFIX_OPTIONS="${POSTFIX_OPTIONS}" pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postfix diff --git a/mail/postfix21/distinfo b/mail/postfix21/distinfo index 4390983..379358e 100644 --- a/mail/postfix21/distinfo +++ b/mail/postfix21/distinfo @@ -1,4 +1,4 @@ MD5 (postfix/postfix-1.1.11.tar.gz) = b34bb2b5018327c19456a77814141208 -MD5 (postfix/pfixtls-0.8.11a-1.1.11-0.9.6d.tar.gz) = 82fc61f233f5edcece3baa749e53677d +MD5 (postfix/pfixtls-0.8.11a-1.1.11-0.9.6g.tar.gz) = 11d82e9a3482f64af9d228f7a4319566 MD5 (postfix/postfix-1.1.11+ipv6.patch.gz) = dc2a6362518025583a17305607eb8f0e MD5 (postfix/postfix-pg.postfix-1.1.8.patch) = e0f4d910a6d6648d9b48e2244f2764ba diff --git a/mail/postfix21/scripts/configure.postfix b/mail/postfix21/scripts/configure.postfix index d25f543..ab884c1 100644 --- a/mail/postfix21/scripts/configure.postfix +++ b/mail/postfix21/scripts/configure.postfix @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/mail/postfix21/scripts/Attic/configure.postfix,v 1.23 2002-06-20 01:32:20 dwcjr Exp $ +# $FreeBSD: /tmp/pcvs/ports/mail/postfix21/scripts/Attic/configure.postfix,v 1.24 2002-08-26 21:33:57 dwcjr Exp $ if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then exit @@ -7,27 +7,35 @@ fi tempfile=`mktemp -t checklist` -if [ "${BATCH}" = "yes" ]; then - set \"PCRE\" +if [ "${POSTFIX_OPTIONS}" ]; then + set ${POSTFIX_OPTIONS} else + set PCRE +fi + +for i; do + eval status_$i=ON +done + +if [ -z "${BATCH}" ]; then /usr/bin/dialog --title "Postfix configuration options" --clear \ --checklist "\n\ Please select desired options:" -1 -1 16 \ -PCRE "Perl Compatible Regular Expressions" OFF \ -SASL "Cyrus SASL (Simple Authentication and Security Layer)" OFF \ -DB3 "Berkeley DB3 (required if SASL also built with DB3)" OFF \ -MySQL "MySQL map lookups" OFF \ -PgSQL "PostgreSQL map lookups" OFF \ -OpenLDAP "OpenLDAP map lookups" OFF \ -Test "SMTP/LMTP test server and generator" OFF \ -TLS "Secure Sockets Layer and Transport Layer Security" OFF \ -IPv6 "IPv6 support (not KAME official)" OFF \ +PCRE "Perl Compatible Regular Expressions" "$status_PCRE" \ +SASL "Cyrus SASL (Simple Authentication and Security Layer)" "$status_SASL" \ +DB3 "Berkeley DB3 (required if SASL also built with DB3)" "$status_DB3" \ +MySQL "MySQL map lookups" "$status_MySQL" \ +PgSQL "PostgreSQL map lookups" "$status_PgSQL" \ +OpenLDAP "OpenLDAP map lookups" "$status_OpenLDAP" \ +Test "SMTP/LMTP test server and generator" "$status_Test" \ +TLS "Secure Sockets Layer and Transport Layer Security" "$status_TLS" \ +IPv6 "IPv6 support (not KAME official)" "$status_IPv6" \ 2> $tempfile retval=$? if [ -s $tempfile ]; then - set `cat $tempfile` + set `sed 's/"//g' $tempfile` fi rm -f $tempfile @@ -50,16 +58,16 @@ echo "PREFIX= ${PREFIX}" SUB_TLS="@comment " SUB_TEST="@comment " -while [ "$1" ]; do - case $1 in - \"PCRE\") +for i; do + case $i in + PCRE) echo "LIB_DEPENDS+= pcre.0:\${PORTSDIR}/devel/pcre" echo "POSTFIX_CCARGS+= -DHAS_PCRE -I\${LOCALBASE}/include" echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lpcre" echo "PCRE_SUFFIX= +pcre" SUB_PCRE="" ;; - \"SASL\") + SASL) echo "LIB_DEPENDS+= sasl.8:\${PORTSDIR}/security/cyrus-sasl" echo "POSTFIX_CCARGS+= -DUSE_SASL_AUTH -I\${LOCALBASE}/include" echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lsasl -lpam -lcrypt" @@ -78,29 +86,29 @@ while [ "$1" ]; do echo ".endif" SUB_SASL="" ;; - \"TLS\") + TLS) echo "MAN8+= tlsmgr.8" echo "POSTFIX_CCARGS+= -DHAS_SSL -I/usr/include/openssl" echo "POSTFIX_AUXLIBS+= -lssl -lcrypto" - echo "DISTFILES+= \${DISTNAME}.tar.gz pfixtls-0.8.11a-1.1.11-0.9.6d.tar.gz" - echo "EXTRA_PATCHES+= \${WRKDIR}/pfixtls-0.8.11a-1.1.11-0.9.6d/pfixtls.diff" + echo "DISTFILES+= \${DISTNAME}.tar.gz pfixtls-0.8.11a-1.1.11-0.9.6g.tar.gz" + echo "EXTRA_PATCHES+= \${WRKDIR}/pfixtls-0.8.11a-1.1.11-0.9.6g/pfixtls.diff" echo "PATCH_STRIP= -p1" echo "TLS_SUFFIX= +tls" SUB_TLS="" ;; - \"DB3\") - echo "LIB_DEPENDS+= db3.2:\${PORTSDIR}/databases/db3" + DB3) + echo "LIB_DEPENDS+= db3.3:\${PORTSDIR}/databases/db3" echo "POSTFIX_CCARGS+= -I\${LOCALBASE}/include/db3" echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -ldb3" echo "DB3_SUFFIX= +db3" ;; - \"MySQL\") + MySQL) echo "BUILD_DEPENDS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a:\${PORTSDIR}/databases/mysql323-client" echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql" echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz" echo "MYSQL_SUFFIX= +mysql" ;; - \"PgSQL\") + PgSQL) echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7" echo "POSTFIX_CCARGS+= -DHAS_PGSQL -I\${LOCALBASE}/include -I\${LOCALBASE}/pgsql/include" echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -L\${LOCALBASE}/pgsql/lib -lpq -lcrypt" @@ -109,23 +117,23 @@ while [ "$1" ]; do echo "PATCHFILES+= postfix-pg.postfix-1.1.8.patch" echo "PATCH_DIST_STRIP= -p1" ;; - \"OpenLDAP\") + OpenLDAP) echo "BUILD_DEPENDS+= \${LOCALBASE}/lib/libldap.a:\${PORTSDIR}/net/openldap" echo "POSTFIX_CCARGS+= -DHAS_LDAP -I\${LOCALBASE}/include" echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/libldap.a \${PREFIX}/lib/liblber.a" echo "OPENLDAP_SUFFIX= +openldap" ;; - \"Test\") + Test) echo "BIN1= smtp-sink smtp-source" SUB_TEST="" ;; - \"IPv6\") + IPv6) if [ `uname -m` != "i386" ]; then /usr/bin/dialog --msgbox "IPv6 patch currently only supported on i386!" 5 60 > /dev/stderr rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - exit 1 + exit 1 fi - if [ X$SUB_TLS = "X" ]; then + if [ -z $SUB_TLS ]; then /usr/bin/dialog --msgbox "IPv6 and TLS patch cannot be used simultaneously!" 5 60 > /dev/stderr rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc exit 1 @@ -136,13 +144,14 @@ while [ "$1" ]; do echo "IPv6_SUFFIX= +ipv6" echo "" ;; + "") + ;; *) echo "Invalid option(s): $*" > /dev/stderr rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc exit 1 ;; esac - shift done echo "PLIST_SUB+= SUB_TLS=\"${SUB_TLS}\"" -- cgit v1.1