aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2017-09-11 00:53:56 +0800
committermandree <mandree@FreeBSD.org>2017-09-11 00:53:56 +0800
commit0eea9388c17aef9c18f9bc1b82a111386eb64be7 (patch)
treec001f7feeb3e8873f3549f0e084b7bdeed52c4ce /mail
parent8c7039bf1ac6e4addc01f9a73a9cec6f0d5cc34a (diff)
downloadfreebsd-ports-gnome-0eea9388c17aef9c18f9bc1b82a111386eb64be7.tar.gz
freebsd-ports-gnome-0eea9388c17aef9c18f9bc1b82a111386eb64be7.tar.zst
freebsd-ports-gnome-0eea9388c17aef9c18f9bc1b82a111386eb64be7.zip
Fix up DEFAULT_URL_HOST/DEFAULT_MAIL_HOST for jailed or external builds.
If the package is built in, for instance, poudriere, or on a computer other than the one it is later installed on, the DEFAULT_MAIL_HOST and DEFAULT_URL_HOST variables in the Mailman/Defaults.py file were unsuitable. Leverage pkg-install to fix these up to be the same as hostname -f at install time. [The MFH would require the intermediate update to 2.1.24 to be included.] MFH: 2017Q3
Diffstat (limited to 'mail')
-rw-r--r--mail/mailman/Makefile5
-rw-r--r--mail/mailman/files/pkg-install.in3
2 files changed, 7 insertions, 1 deletions
diff --git a/mail/mailman/Makefile b/mail/mailman/Makefile
index 0f7f05bf7409..be9dfb25387c 100644
--- a/mail/mailman/Makefile
+++ b/mail/mailman/Makefile
@@ -3,6 +3,7 @@
PORTNAME= mailman
DISTVERSION= 2.1.24
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= GNU \
SF/${PORTNAME}/Mailman%202.1%20%28stable%29/${PORTVERSION} \
@@ -34,7 +35,9 @@ CONFIGURE_ARGS+=--with-python=${PYTHON_CMD} \
--with-username=${MM_USERNAME} \
--with-groupname=${MM_GROUPNAME} \
--with-mail-gid=${MAIL_GID} --with-cgi-gid=${CGI_GID} \
- --with-permcheck=no
+ --with-permcheck=no \
+ --with-mailhost=// \
+ --with-urlhost=//
# The Mailman port supports a number of variables that may be tweaked at
# build time. Getting the values of some of them right is crucial!
diff --git a/mail/mailman/files/pkg-install.in b/mail/mailman/files/pkg-install.in
index 90d4f0584318..ce9bbd6474c0 100644
--- a/mail/mailman/files/pkg-install.in
+++ b/mail/mailman/files/pkg-install.in
@@ -106,6 +106,9 @@ POST-INSTALL)
echo "---> rcfile sets mailman_fix_perms to no, skipping check_perms"
fi
+ echo "---> Fixing up default host names (MAILHOST, URLHOST)"
+ sed -Ee "s}^(DEFAULT_(EMAIL|URL)_HOST) = '//'}\1 = '`hostname -f`'}" -i '' "%%MAILMANDIR%%/Mailman/Defaults.py"
+
echo "---> Running assorted other checks"
if egrep -q "^[ \t]*MTA.*=.*Postfix" "%%MAILMANDIR%%/Mailman/mm_cfg.py" ; then
# run Postfix-specific checks