aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/exim-doc-info/Makefile1
-rw-r--r--mail/exim-ldap2/Makefile1
-rw-r--r--mail/exim-monitor/Makefile2
-rw-r--r--mail/exim-monitor/pkg-plist6
-rw-r--r--mail/exim-mysql/Makefile1
-rw-r--r--mail/exim-postgresql/Makefile1
-rw-r--r--mail/exim-sa-exim/Makefile1
-rw-r--r--mail/exim-sqlite/Makefile1
-rw-r--r--mail/exim/Makefile122
-rw-r--r--mail/exim/distinfo4
-rw-r--r--mail/exim/files/patch-scripts::exim_install94
-rw-r--r--mail/exim/files/patch-src::EDITME2
-rw-r--r--mail/exim/pkg-install57
-rw-r--r--mail/exim/pkg-plist107
14 files changed, 199 insertions, 201 deletions
diff --git a/mail/exim-doc-info/Makefile b/mail/exim-doc-info/Makefile
index b9866ee8f49a..4518c27e0558 100644
--- a/mail/exim-doc-info/Makefile
+++ b/mail/exim-doc-info/Makefile
@@ -5,5 +5,4 @@ DOCFORMAT= info
DISTDOCFORMAT= texinfo
MASTERDIR= ${.CURDIR}/../exim-doc-html
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-ldap2/Makefile b/mail/exim-ldap2/Makefile
index 7810171dc0ce..e0513b9b9ed3 100644
--- a/mail/exim-ldap2/Makefile
+++ b/mail/exim-ldap2/Makefile
@@ -6,5 +6,4 @@ MASTERDIR= ${.CURDIR}/../exim
WITH_OPENLDAP= yes
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-monitor/Makefile b/mail/exim-monitor/Makefile
index fe3c4affa7af..088577f6dab9 100644
--- a/mail/exim-monitor/Makefile
+++ b/mail/exim-monitor/Makefile
@@ -6,7 +6,6 @@ PKGNAMESUFFIX= -monitor
COMMENT= The Exim monitor for the Exim MTA
MASTERDIR= ${.CURDIR}/../exim
-PKGDIR= ${.CURDIR}
EXIMON_ONLY= yes
@@ -15,5 +14,4 @@ EXIMON_ONLY= yes
#
#RUN_DEPENDS= ${LOCALBASE}/sbin/exim:${PORTSDIR}/mail/exim
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-monitor/pkg-plist b/mail/exim-monitor/pkg-plist
deleted file mode 100644
index d932da943256..000000000000
--- a/mail/exim-monitor/pkg-plist
+++ /dev/null
@@ -1,6 +0,0 @@
-@unexec if cmp -s %D/etc/exim/configure %D/etc/exim/configure.default; then rm -f %D/etc/exim/configure; fi
-etc/exim/configure.default
-@exec [ -f %B/configure ] || cp %B/%f %B/configure
-@unexec rmdir %B 2>/dev/null || true
-sbin/eximon
-sbin/eximon.bin
diff --git a/mail/exim-mysql/Makefile b/mail/exim-mysql/Makefile
index 6fb2469eb934..5cc267262f87 100644
--- a/mail/exim-mysql/Makefile
+++ b/mail/exim-mysql/Makefile
@@ -6,5 +6,4 @@ MASTERDIR= ${.CURDIR}/../exim
WITH_MYSQL= yes
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-postgresql/Makefile b/mail/exim-postgresql/Makefile
index 082c36d5a998..4a2e965e0119 100644
--- a/mail/exim-postgresql/Makefile
+++ b/mail/exim-postgresql/Makefile
@@ -6,5 +6,4 @@ MASTERDIR= ${.CURDIR}/../exim
WITH_PGSQL= yes
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-sa-exim/Makefile b/mail/exim-sa-exim/Makefile
index daf29bd935ef..24c5b1a2b3f1 100644
--- a/mail/exim-sa-exim/Makefile
+++ b/mail/exim-sa-exim/Makefile
@@ -8,5 +8,4 @@ PORTVERSION?= ${EXIM_VERSION}+${SA_EXIM_VERSION}
WITH_SA_EXIM= yes
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim-sqlite/Makefile b/mail/exim-sqlite/Makefile
index 2ff72bf1a220..e7e428030302 100644
--- a/mail/exim-sqlite/Makefile
+++ b/mail/exim-sqlite/Makefile
@@ -6,5 +6,4 @@ MASTERDIR= ${.CURDIR}/../exim
WITH_SQLITE= yes
-NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 06e71c5be0a0..cdc709c90d11 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -12,16 +12,15 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:exim
DIST_SUBDIR= exim
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= vsevolod@FreeBSD.org
COMMENT?= High performance MTA for Unix systems on the Internet
LICENSE= GPLv2
-USE_BZIP2= yes
-WANT_GNOME= yes
-MAKE_JOBS_UNSAFE= yes
+USES= tar:bzip2
-NO_STAGE= yes
+# Exim build system is job unsafe atm
+MAKE_JOBS_UNSAFE= yes
# One can tune the following "hidden" knobs:
# - EXIM_USER: user exim is running as;
# - EXIM_GROUP: ditto for the group;
@@ -75,11 +74,14 @@ PLIST_SUB+= SO_1024=""
PLIST_SUB+= SO_1024="@comment "
.endif
-EXIM_VERSION= 4.82
+EXIM_VERSION= 4.82.1
SA_EXIM_VERSION=4.2
SO_1024_VERSION=3.2
+EXIM_INSTALL_ARG+= "-no_chown" "-no_symlink"
+
.if !defined(EXIMON_ONLY)
+PLIST_SUB+= EXIM=""
.if defined(PKGNAMESUFFIX)
CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-4.*
.endif
@@ -92,6 +94,7 @@ CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}${suffix}-4.*
CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-monitor-4.*
.endif
.else # !EXIMON_ONLY
+PLIST_SUB+= EXIM="@comment "
PORT_OPTIONS+= EXIMON
.endif # !EXIMON_ONLY
@@ -99,9 +102,7 @@ PORT_OPTIONS+= EXIMON
USE_XORG= x11 xaw xt
.endif
-.if !defined(EXIMON_ONLY)
-MAN8= exim.8
-.else
+.if defined(EXIMON_ONLY)
NO_INSTALL_MANPAGES= yes
.endif
@@ -114,9 +115,7 @@ PORT_EXAMPLES= convert4r3 convert4r4 transport-filter.pl
DAILY_SCRIPTS= 150.exim-tidydb 460.exim-mail-rejects
-PKGINSTALL= ${WRKDIR}/pkg-install
-
-.if defined(NOPORTDOCS) && !defined(EXIMON_ONLY)
+.if !defined(EXIMON_ONLY)
PKGMESSAGE= ${WRKDIR}/POST-INSTALL-NOTES
.else
PKGMESSAGE= ${WRKDIR}/pkg-message
@@ -124,14 +123,20 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
MAKE_ENV+= OSTYPE="${OPSYS}" ARCHTYPE="${ARCH}" DUMMY_LDFLAGS="${DUMMY_LDFLAGS}"
.if defined(EXIMON_ONLY)
-MAKE_ENV+= INSTALL_ARG="eximon eximon.bin"
-.elif ! ${PORT_OPTIONS:MSUID}
-MAKE_ENV+= INSTALL_ARG="-no_chown"
+EXIM_INSTALL_ARG+= "eximon" "eximon.bin"
.endif
EXIM_USER?= mailnull
EXIM_GROUP?= mail
+# Default user/group are system ones, so we don't want to check them
+.if ${EXIM_USER} != "mailnull"
+USERS= ${EXIM_USER}
+.endif
+.if ${EXIM_GROUP} != "mail"
+GROUPS= ${EXIM_GROUP}
+.endif
+
LOGDIR?= /var/log/exim
LOG_FILE_PATH?= ${LOGDIR}/%slog
CONFIG_FILE_PATH?= ${PREFIX}/etc/exim/configure
@@ -147,7 +152,7 @@ SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
PLIST_SUB+= EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \
EXIM_USER=${EXIM_USER} \
EXIM_GROUP=${EXIM_GROUP} \
- LOGDIR="${LOGDIR}"
+ LOGDIR="${LOGDIR:S/^\///}"
# Exim refuses to run local deliveries as root by default. You can
# add other users to this colon-separated list that cannot be
@@ -161,7 +166,7 @@ WITH_DEFAULT_CHARSET?= ISO-8859-1
# You should not need to fiddle with anything below this point.
-LIB_DEPENDS+= pcre.3:${PORTSDIR}/devel/pcre
+LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
.if ! ${PORT_OPTIONS:MDKIM}
SEDLIST+= -e 's,^\# (DISABLE_DKIM=),\1,'
@@ -215,7 +220,7 @@ SEDLIST+= -e 's,^\# (SUPPORT_TLS=),\1,'
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
SEDLIST+= -e 's,^\# (TLS_LIBS=.*-lssl[[:space:]]),\1,'
.else
-LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
+LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls
SEDLIST+= -e 's,^\# (USE_GNUTLS=),\1,'
SEDLIST+= -e 's,^\# (TLS_LIBS=.*-lgnutls[[:space:]]),\1,'
.endif
@@ -237,9 +242,6 @@ SEDLIST+= -e 's,XX_TCP_WRAPPERS_LIBS_XX,,'
USES+= iconv
SEDLIST+= -e 's,XX_ICONV_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib ${ICONV_LIB},' \
-e 's,^\# (HAVE_ICONV=),\1,'
-.if exists(/usr/include/iconv.h) && exists(${LOCALBASE}/include/iconv.h)
-IGNORE= You have iconv support in base system, but ${LOCALBASE}/include/iconv.h is present too. It will hiccup the build.
-.endif
.else
SEDLIST+= -e 's,XX_ICONV_LIBS_XX,,'
.endif
@@ -333,7 +335,7 @@ SEDLIST+= -e 's,^\# (AUTH_SPA=),\1,'
.endif
.if ${PORT_OPTIONS:MAUTH_SASL}
-LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2
+LIB_DEPENDS+= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
SEDLIST+= -e 's,^\# (AUTH_CYRUS_SASL=),\1,' \
-e 's,^\# (AUTH_LIBS=.*-lsasl2),\1,'
.endif
@@ -345,7 +347,7 @@ SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-lradius,' \
-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1/etc/radius.conf,' \
-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADLIB,'
.elif ${WITH_RADIUS_TYPE:tl} == radiusclient
-LIB_DEPENDS+= radiusclient-ng.2:${PORTSDIR}/net/radiusclient
+LIB_DEPENDS+= libradiusclient-ng.so:${PORTSDIR}/net/radiusclient
SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib -lradiusclient-ng,' \
-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1${LOCALBASE:S/,/\\,/g}/etc/radiusclient-ng/radiusclient.conf,' \
-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADIUSCLIENTNEW,'
@@ -427,7 +429,7 @@ SEDLIST+= -e 's,^(ALT_CONFIG_PREFIX=),\# \1,'
.endif
.if ${PORT_OPTIONS:MSPF}
-LIB_DEPENDS+= spf2.3:${PORTSDIR}/mail/libspf2
+LIB_DEPENDS+= libspf2.so:${PORTSDIR}/mail/libspf2
SEDLIST+= -e 's,XX_SPF_FLAGS_XX,-DSPF,' \
-e 's,XX_SPF_LIBS_XX,-lspf2 ${PTHREAD_LIBS:S/,/\\,/g},' \
-e 's,^\# (EXPERIMENTAL_SPF=),\1,'
@@ -437,11 +439,11 @@ SEDLIST+= -e 's,XX_SPF_FLAGS_XX,,' \
.endif
.if ${PORT_OPTIONS:MSRS}
-LIB_DEPENDS+= srs2.0:${PORTSDIR}/mail/libsrs2
+LIB_DEPENDS+= libsrs2.so:${PORTSDIR}/mail/libsrs2
SEDLIST+= -e 's,XX_SRS_FLAGS_XX,-DSRS,' \
-e 's,XX_SRS_LIBS_XX,-lsrs2,'
.elif ${PORT_OPTIONS:MSRS_ALT}
-LIB_DEPENDS+= srs_alt.1:${PORTSDIR}/mail/libsrs_alt
+LIB_DEPENDS+= libsrs_alt.so:${PORTSDIR}/mail/libsrs_alt
SEDLIST+= -e 's,XX_SRS_FLAGS_XX,-DEXPERIMENTAL_SRS,' \
-e 's,XX_SRS_LIBS_XX,-lsrs_alt,'
.else
@@ -476,10 +478,6 @@ SUB_LIST+= LOGDIR="${LOGDIR}"
PLIST_SUB+= DAEMON="@comment "
.endif
-.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR}
-.error EXIMON_ONLY is not user settable
-.endif
-
.if ${PORT_OPTIONS:MIPV6}
SEDLIST+= -e 's,^\# (HAVE_IPV6=),\1,'
.endif
@@ -492,10 +490,18 @@ SEDLIST+= -e 's,^\# (WHITELIST_D_MACROS=).*$$,\1${WHITELIST_D_MACROS:S/,/\\,/g},
.endif
.endif
+.if ${PORT_OPTIONS:MSUID}
+PLIST_SUB+= EXIM_SUID=""
+.else
+PLIST_SUB+= EXIM_SUID="@comment "
+.endif
+
.if defined(TRUSTED_CONFIG_LIST)
SEDLIST+= -e 's,^\# (TRUSTED_CONFIG_LIST=).*$$,\1${TRUSTED_CONFIG_LIST:S/,/\\,/g},'
.endif
+MAKE_ENV+= INSTALL_ARG="${EXIM_INSTALL_ARG}"
+PLIST_SUB+= RESETPREFIX=${PREFIX}
DUMMY_LDFLAGS!= ${ECHO_CMD} ${LDFLAGS} | ${SED} -e 's|-Wl,-rpath|-Wl,-DUMMYrpath|g; s|-rpath|-Wl,-rpath|g; s|-DUMMYrpath|-rpath|g'
pre-everything::
@@ -533,7 +539,6 @@ do-configure:
.if ${PORT_OPTIONS:MEXIMON}
@${CP} ${WRKSRC}/exim_monitor/EDITME ${WRKSRC}/Local/eximon.conf
.endif
- @[ ! -f ${PKGDIR}/pkg-install ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install > ${PKGINSTALL}
@${REINPLACE_CMD} -E ${SEDLIST} ${WRKSRC}/src/configure.default
@${REINPLACE_CMD} -e 's!$$(LDFLAGS)!$$(DUMMY_LDFLAGS) -L$${LOCALBASE}/lib!' ${WRKSRC}/OS/Makefile-Base
@${REINPLACE_CMD} -e 's/"(Exim $$version_number)\\n\\t"/"(Exim $$version_number (${OPSYS}))\\n\\t"/' \
@@ -574,62 +579,43 @@ post-build:
@[ ! -f ${PKGDIR}/pkg-message ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-message > ${WRKDIR}/pkg-message
.if !defined(EXIMON_ONLY)
-
-pre-install:
- if ! /usr/sbin/pw groupshow ${EXIM_GROUP}; then /usr/sbin/pw groupadd ${EXIM_GROUP} -g 125; fi
- if ! /usr/sbin/pw usershow ${EXIM_USER}; then /usr/sbin/pw useradd ${EXIM_USER} -g ${EXIM_GROUP} -u 125 \
- -h - -d /var/spool/exim -s /nonexistent -c "Exim User"; fi
- @[ -d "/etc" ] || ${MKDIR} "/etc"
- @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
post-install:
.if ${PORT_OPTIONS:MDAEMON}
- @${MKDIR} ${PREFIX}/etc/periodic/daily
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
.for script in ${DAILY_SCRIPTS}
- @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${PREFIX}/etc/periodic/daily/${script}
+ @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${STAGEDIR}${PREFIX}/etc/periodic/daily/${script}
.endfor
.endif
- @[ -f ${PREFIX}/etc/exim/configure ] || \
- ${CP} ${PREFIX}/etc/exim/configure.default ${PREFIX}/etc/exim/configure
-.for manfile in ${MAN8}
- @${INSTALL_MAN} ${WRKSRC}/doc/${manfile} ${MAN8PREFIX}/man/man8
-.endfor
+
+ @${INSTALL_MAN} ${WRKSRC}/doc/exim.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
+
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DOCSDIR}
- @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${STAGEDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${STAGEDIR}${DOCSDIR}
.for docfile in ${PORTDOC_BASE}
- @${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR}
.endfor
.for docfile in ${PORTDOC_FILES}
- @${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${STAGEDIR}${DOCSDIR}
.endfor
- @${MKDIR} ${EXAMPLESDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for example in ${PORT_EXAMPLES}
- @${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${ARCH}/${example} ${EXAMPLESDIR}
+ @${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${ARCH}/${example} ${STAGEDIR}${EXAMPLESDIR}
.endfor
.endif
.if ${PORT_OPTIONS:MSA_EXIM}
@${INSTALL_DATA} ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf \
- ${PREFIX}/etc/exim/sa-exim.conf.default
- @[ -f ${PREFIX}/etc/exim/sa-exim.conf ] || \
- ${CP} ${PREFIX}/etc/exim/sa-exim.conf.default \
- ${PREFIX}/etc/exim/sa-exim.conf
+ ${STAGEDIR}${PREFIX}/etc/exim/sa-exim.conf.sample
.endif
+ @${MKDIR} -m 750 ${STAGEDIR}${LOGDIR}
+
.if ${PORT_OPTIONS:MSO_1024}
-.if !exists(/var/spool/spamooborona)
- @${MKDIR} -m 750 /var/spool/spamooborona
- @${CHOWN} ${EXIM_USER}:${EXIM_GROUP} /var/spool/spamooborona
+.if !exists(${STAGEDIR}var/spool/spamooborona)
+ @${MKDIR} -m 750 ${STAGEDIR}var/spool/spamooborona
.endif
.endif
- @${CAT} ${PKGMESSAGE}
- @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
-.else
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.endif
+.endif # ! defined(EXIMON_ONLY)
.include <bsd.port.mk>
diff --git a/mail/exim/distinfo b/mail/exim/distinfo
index 72be582f1150..750ee94c2a1e 100644
--- a/mail/exim/distinfo
+++ b/mail/exim/distinfo
@@ -1,5 +1,5 @@
-SHA256 (exim/exim-4.82.tar.bz2) = 46dedfb6ced2aa4a1eddc5d8ce46a790a961508bd389faa2e215302ae80d91cf
-SIZE (exim/exim-4.82.tar.bz2) = 1722771
+SHA256 (exim/exim-4.82.1.tar.bz2) = 51798cead70b9ca03df88afb63f7a0cabedee8ef82c02bd18d67591c08b14500
+SIZE (exim/exim-4.82.1.tar.bz2) = 1722912
SHA256 (exim/sa-exim-4.2.tar.gz) = 72e0a735547f18b05785e6c58a71d24623858f0f5234a5dc0e24cb453999e99a
SIZE (exim/sa-exim-4.2.tar.gz) = 66575
SHA256 (exim/spamooborona1024-src-3.2.tar.gz) = ab22a430f3860460045f6b213c68c89700a0cd10cbb6c7a808ece326c53787ee
diff --git a/mail/exim/files/patch-scripts::exim_install b/mail/exim/files/patch-scripts::exim_install
index 7874ce90e902..7a2fec05545a 100644
--- a/mail/exim/files/patch-scripts::exim_install
+++ b/mail/exim/files/patch-scripts::exim_install
@@ -1,6 +1,46 @@
---- scripts/exim_install.orig Wed May 5 12:08:35 2004
-+++ scripts/exim_install Wed May 5 15:07:53 2004
-@@ -357,9 +357,8 @@
+--- scripts/exim_install.orig 2014-05-26 20:14:16.000000000 +0100
++++ scripts/exim_install 2014-07-04 12:40:45.002262243 +0100
+@@ -29,6 +29,7 @@
+
+ do_chown=yes
+ do_symlink=yes
++do_info=yes
+
+ while [ $# -gt 0 ] ; do
+ case "$1" in
+@@ -51,6 +52,10 @@
+ do_symlink=no
+ ;;
+
++ -no_info)
++ do_info=no
++ ;;
++
+ *)
+ break
+ ;;
+@@ -117,9 +122,7 @@
+ CONFIGURE_FILE=${DESTDIR}${CONFIGURE_FILE}
+ SYSTEM_ALIASES_FILE=${DESTDIR}${SYSTEM_ALIASES_FILE}
+
+-if [ "${INFO_DIRECTORY}" != "" ] ; then
+- INFO_DIRECTORY=${DESTDIR}${INFO_DIRECTORY}
+-fi
++INFO_DIRECTORY=${DESTDIR}${INFO_DIRECTORY}
+
+ # Overrides of other things
+ case "$inst_uid" in ?*) INST_UID="$inst_uid";; esac
+@@ -217,8 +220,7 @@
+ # The exim binary is handled specially
+
+ if [ $name = exim${EXE} ]; then
+- version=exim-`./exim -bV -C /dev/null | \
+- awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE}
++ version=exim
+
+ if [ "${version}" = "exim-${EXE}" ]; then
+ echo $com ""
+@@ -382,9 +384,8 @@
echo $com ' ' ${CONFIGURE_FILE}
echo $com Therefore, skipping automatic installation.
@@ -8,34 +48,64 @@
- echo $com Installing default configuration in ${CONFIGURE_FILE}
- echo $com because there is no existing configuration file.
+else
-+ echo $com Installing default configuration in ${CONFIGURE_FILE}.default
++ echo $com Installing default configuration in ${CONFIGURE_FILE}.sample
if [ "${SYSTEM_ALIASES_FILE}" = "" ] ; then
SYSTEM_ALIASES_FILE=/etc/aliases
echo $com This configuration has system aliases in ${SYSTEM_ALIASES_FILE}.
-@@ -370,7 +369,7 @@
+@@ -394,8 +395,8 @@
+ ${real} ${MKDIR} -p `${DIRNAME} ${CONFIGURE_FILE}`
echo sed -e '\\'
- echo " \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'\"" '\\'
+- echo " \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'\"" '\\'
- echo " ../src/configure.default > \${CONFIGURE_FILE}"
-+ echo " ../src/configure.default > \${CONFIGURE_FILE}.default"
++ echo " \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'\"" '\\'
++ echo " ../src/configure.default > \${CONFIGURE_FILE}.sample"
# I can't find a way of writing this using the ${real} feature because
# it seems that the output redirection always happens, even when -n was
-@@ -379,7 +378,7 @@
+@@ -403,8 +404,8 @@
+
if [ "$real" = "" ] ; then
sed -e \
- "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'" \
+- "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'" \
- ../src/configure.default > ${CONFIGURE_FILE}
-+ ../src/configure.default > ${CONFIGURE_FILE}.default
++ "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'" \
++ ../src/configure.default > ${CONFIGURE_FILE}.sample
else
true
fi
-@@ -399,8 +398,6 @@
- ${real} ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
+@@ -414,24 +415,22 @@
+ echo $com "*** Exim installation ${ver}failed ***"
+ exit 1
fi
+- if [ ! -f ${SYSTEM_ALIASES_FILE} ]; then
+- echo $com '****'
+- echo $com Installing a dummy ${SYSTEM_ALIASES_FILE} file because you do not have
+- echo $com one, and the default configuration requires it. You should
+- echo $com edit ${SYSTEM_ALIASES_FILE} and at least create an alias for postmaster.
+- echo $com '***'
+- echo ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
+- ${real} ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
+- fi
++# if [ ! -f ${SYSTEM_ALIASES_FILE} ]; then
++# echo $com '****'
++# echo $com Installing a dummy ${SYSTEM_ALIASES_FILE} file because you do not have
++# echo $com one, and the default configuration requires it. You should
++# echo $com edit ${SYSTEM_ALIASES_FILE} and at least create an alias for postmaster.
++# echo $com '***'
++# echo ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
++# ${real} ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
++# fi
-else
- echo $com Configuration file ${CONFIGURE_FILE} already exists
fi
# Install info files if the directory is defined and the Texinfo
+ # source documentation is present.
+
+-if [ "${INFO_DIRECTORY}" != "" -a -f ../doc/spec.texinfo ] ; then
++if [ "$do_info" != "no" -a -f ../doc/spec.texinfo ] ; then
+ echo $com ""
+ if [ ! -d "${INFO_DIRECTORY}" ] ; then
+ echo mkdir -p ${INFO_DIRECTORY}
diff --git a/mail/exim/files/patch-src::EDITME b/mail/exim/files/patch-src::EDITME
index 624dbcf026c2..172c4bbbe056 100644
--- a/mail/exim/files/patch-src::EDITME
+++ b/mail/exim/files/patch-src::EDITME
@@ -32,7 +32,7 @@
# you want to use a group other than the default group for the given user.
-# EXIM_GROUP=
-+EXIM_GROUP=XX_EXIM_GROUP_XX
++EXIM_GROUP=ref:XX_EXIM_GROUP_XX
# Many sites define a user called "exim", with an appropriate default group,
# and use
diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install
deleted file mode 100644
index 2665b5f04914..000000000000
--- a/mail/exim/pkg-install
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# Since FreeBSD does not supply a user for running an MTA in a sandbox
-# by default, use user 'exim', adding it if it does not exist. Even
-# if FreeBSD supplied an MTA user, it's neglected to do so for so long
-# that every sandboxed MTA under the sun uses its own user, so user
-# 'exim' should probably be used forever.
-#
-# Modern FreeBSD systems already have a group mail.
-#
-# $FreeBSD$
-#
-
-PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
-
-user=%%EXIM_USER%%
-group=%%EXIM_GROUP%%
-logdir=%%LOGDIR%%
-
-if [ "$2" = "PRE-INSTALL" ]; then
- if ! /usr/sbin/pw groupshow ${group} >/dev/null; then
- /usr/sbin/pw groupadd ${group} -g 125
- fi
- if ! /usr/sbin/pw usershow ${user} >/dev/null; then
- /usr/sbin/pw useradd ${user} -g ${group} -u 125 \
- -h - -d /var/spool/exim -s /nonexistent -c "Exim User"
- fi
- /bin/mkdir -p ${logdir}
- /usr/sbin/chown ${user}:${group} ${logdir}
-fi
-
-if [ "$2" = "POST-INSTALL" ]; then
- cf=$PKG_PREFIX/etc/exim/configure
- if [ -e $cf ]; then
- if /usr/bin/grep -q '^[^#]*hostlist.*relay_from_hosts.*=.*127.0.0.1' $cf
- then
- echo
- echo "============================================================"
- echo " !!! WARNING !!! "
- echo "============================================================"
- echo
- echo "Existing configure file $cf"
- echo "contains 127.0.0.1 in relay_from_hosts hostlist!"
- echo "Use of localhost instead of 127.0.0.1 is highly recommended."
- echo
- echo "============================================================"
- echo " !!! WARNING !!! "
- echo "============================================================"
- fi
- fi
- if ! /usr/bin/grep -qs "^exim_enable" /etc/rc.conf
- then
- echo
- echo "Don't forget to add 'exim_enable=\"YES\"' to rc.conf(5)"
- echo
- fi
-fi
diff --git a/mail/exim/pkg-plist b/mail/exim/pkg-plist
index 9d70356e1c5f..3d2d6825e24e 100644
--- a/mail/exim/pkg-plist
+++ b/mail/exim/pkg-plist
@@ -1,53 +1,66 @@
-sbin/exim
-sbin/exim-%%EXIM_VERSION%%
-sbin/exim_checkaccess
-sbin/exim_dbmbuild
-sbin/exim_dumpdb
-sbin/exim_fixdb
-sbin/exim_lock
-sbin/exim_tidydb
-sbin/exicyclog
-sbin/exigrep
-sbin/eximstats
-sbin/exinext
-sbin/exipick
-sbin/exiqgrep
-sbin/exiqsumm
-sbin/exiwhat
+%%EXIM_SUID%%@mode 4755
+%%EXIM%%sbin/exim
+%%EXIM_SUID%%@mode
+%%EXIM%%sbin/exim_checkaccess
+%%EXIM%%sbin/exim_dbmbuild
+%%EXIM%%sbin/exim_dumpdb
+%%EXIM%%sbin/exim_fixdb
+%%EXIM%%sbin/exim_lock
+%%EXIM%%sbin/exim_tidydb
+%%EXIM%%sbin/exicyclog
+%%EXIM%%sbin/exigrep
+%%EXIM%%sbin/eximstats
+%%EXIM%%sbin/exinext
+%%EXIM%%sbin/exipick
+%%EXIM%%sbin/exiqgrep
+%%EXIM%%sbin/exiqsumm
+%%EXIM%%sbin/exiwhat
+%%EXIM%%man/man8/exim.8.gz
%%EXIMON%%sbin/eximon
%%EXIMON%%sbin/eximon.bin
-%%PORTDOCS%%%%DOCSDIR%%/ACKNOWLEDGMENTS
-%%PORTDOCS%%%%DOCSDIR%%/NOTICE
-%%PORTDOCS%%%%DOCSDIR%%/README.UPDATING
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/Exim3.upgrade
-%%PORTDOCS%%%%DOCSDIR%%/Exim4.upgrade
-%%PORTDOCS%%%%DOCSDIR%%/NewStuff
-%%PORTDOCS%%%%DOCSDIR%%/OptionLists.txt
-%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES
-%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES.clamd
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/README.SIEVE
-%%PORTDOCS%%%%DOCSDIR%%/dbm.discuss.txt
-%%PORTDOCS%%%%DOCSDIR%%/experimental-spec.txt
-%%PORTDOCS%%%%DOCSDIR%%/filter.txt
-%%PORTDOCS%%%%DOCSDIR%%/spec.txt
-%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
-%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r3
-%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r4
-%%PORTDOCS%%%%EXAMPLESDIR%%/transport-filter.pl
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/ACKNOWLEDGMENTS
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/NOTICE
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/README.UPDATING
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/Exim3.upgrade
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/Exim4.upgrade
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/NewStuff
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/OptionLists.txt
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES.clamd
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/README
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/README.SIEVE
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/dbm.discuss.txt
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/experimental-spec.txt
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/filter.txt
+%%EXIM%%%%PORTDOCS%%%%DOCSDIR%%/spec.txt
+%%EXIM%%%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
+%%EXIM%%%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r3
+%%EXIM%%%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r4
+%%EXIM%%%%PORTDOCS%%%%EXAMPLESDIR%%/transport-filter.pl
+%%EXIM%%%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
%%DAEMON%%etc/periodic/daily/150.exim-tidydb
%%DAEMON%%etc/periodic/daily/460.exim-mail-rejects
%%DAEMON%%@dirrmtry etc/periodic/daily
%%DAEMON%%@dirrmtry etc/periodic
-@unexec if cmp -s %D/etc/exim/configure %D/etc/exim/configure.default; then rm -f %D/etc/exim/configure; fi
-etc/exim/configure.default
-@exec [ -f %B/configure ] || cp %B/%f %B/configure
-%%SA_EXIM%%@unexec if cmp -s %D/etc/exim/sa-exim.conf %D/etc/exim/sa-exim.conf.default; then rm -f %D/etc/exim/sa-exim.conf; fi
-%%SA_EXIM%%etc/exim/sa-exim.conf.default
-%%SA_EXIM%%@exec [ -f %B/sa-exim.conf ] || cp %B/%f %B/sa-exim.conf
-@unexec rmdir %B 2> /dev/null || true
-@unexec rmdir %%LOGDIR%% 2> /dev/null || true
-%%SO_1024%%@exec [ ! -d /var/spool/spamooborona ] && mkdir -m 750 /var/spool/spamooborona && chown %%EXIM_USER%%:%%EXIM_GROUP%% /var/spool/spamooborona || true
-%%SO_1024%%@unexec rmdir /var/spool/spamooborona 2> /dev/null || true
+@sample %%ETCDIR%%/configure.sample
+%%SA_EXIM%%@sample %%ETCDIR%%/sa-exim.conf.sample
+@dirrmtry %%ETCDIR%%
+
+%%EXIM%%@owner %%EXIM_USER%%
+%%EXIM%%@group %%EXIM_GROUP%%
+%%EXIM%%@cwd /
+%%EXIM%%@dirrmtry %%LOGDIR%%
+%%EXIM%%@cwd %%RESETPREFIX%%
+%%EXIM%%@owner root
+%%EXIM%%@group wheel
+%%EXIM%%@exec install -d -o %%EXIM_USER%% -g %%EXIM_GROUP%% /%%LOGDIR%%
+
+%%SO_1024%%@owner %%EXIM_USER%%
+%%SO_1024%%@group %%EXIM_GROUP%%
+%%SO_1024%%@cwd /
+%%SO_1024%%@dirrmtry var/spool/spamooborona
+%%SO_1024%%@cwd %%RESETPREFIX%%
+%%SO_1024%%@owner root
+%%SO_1024%%@group wheel
+%%SO_1024%%@exec install -d -o %%EXIM_USER%% -g %%EXIM_GROUP%% /var/spool/spamooborona