View | Details | Raw Unified | Return to bug 280019
Collapse All | Expand All

(-)b/mail/postfix/Makefile (-16 / +14 lines)
Lines 1-6 Link Here
1
PORTNAME=	postfix
1
PORTNAME=	postfix
2
DISTVERSION=	3.9.0
2
DISTVERSION=	3.9.0
3
PORTREVISION?=	1
3
PORTREVISION?=	2
4
PORTEPOCH=	1
4
PORTEPOCH=	1
5
CATEGORIES=	mail
5
CATEGORIES=	mail
6
MASTER_SITES=	https://postfix-mirror.horus-it.com/postfix-release/ \
6
MASTER_SITES=	https://postfix-mirror.horus-it.com/postfix-release/ \
Lines 141-146 PGSQL_USES= pgsql Link Here
141
SASL_LIB_DEPENDS=		libsasl2.so:security/cyrus-sasl2
141
SASL_LIB_DEPENDS=		libsasl2.so:security/cyrus-sasl2
142
SQLITE_USES=			sqlite
142
SQLITE_USES=			sqlite
143
143
144
ALL_TARGET=			default
145
144
.include <bsd.port.options.mk>
146
.include <bsd.port.options.mk>
145
147
146
HTML1=		body_checks.5.html bounce.5.html postfix-power.png \
148
HTML1=		body_checks.5.html bounce.5.html postfix-power.png \
Lines 197-213 READMEDIR= ${DOCSDIR} Link Here
197
READMEDIR=	no
199
READMEDIR=	no
198
.endif
200
.endif
199
201
200
# dynamic direcory location
202
# dynamic directory location
201
DAEMONDIR=		${PREFIX}/libexec/postfix
203
DAEMONDIR=		${PREFIX}/libexec/postfix
202
SHLIB_DIRECTORY=	${PREFIX}/lib/postfix
204
SHLIB_DIRECTORY=	${PREFIX}/lib/postfix
203
# new proposed location is ETCDIR (see README_FILES/INSTALL)
205
# new proposed location is ETCDIR (see README_FILES/INSTALL)
204
# keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMOMDIR
206
# keep compatiblity with Postfix 2.6 .. 2.11 and use DAEMONDIR
205
META_DIRECTORY=		${DAEMONDIR}
207
META_DIRECTORY=		${DAEMONDIR}
206
208
207
SUB_LIST+=	DAEMONDIR="${DAEMONDIR}" \
209
SUB_LIST+=	REQUIRE="${_REQUIRE}"
208
		META_DIRECTORY="${META_DIRECTORY}" \
209
		READMEDIR="${READMEDIR}" \
210
		REQUIRE="${_REQUIRE}"
211
SUB_FILES+=	mailer.conf.postfix pkg-install pkg-message
210
SUB_FILES+=	mailer.conf.postfix pkg-install pkg-message
212
211
213
POSTFIX_CCARGS+=	-DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
212
POSTFIX_CCARGS+=	-DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
Lines 383-401 post-patch: Link Here
383
		>> ${WRKSRC}/conf/postfix-files
382
		>> ${WRKSRC}/conf/postfix-files
384
383
385
do-configure:
384
do-configure:
386
	(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles \
385
	${MAKE} -C ${WRKSRC} -f Makefile.init makefiles \
387
	${MAKEFILEFLAGS} CCARGS="${POSTFIX_CCARGS}" \
386
		${MAKEFILEFLAGS} CCARGS="${POSTFIX_CCARGS}" \
388
	shared=yes shlib_directory=${SHLIB_DIRECTORY} \
387
		shared=yes shlib_directory=${SHLIB_DIRECTORY} \
389
	dynamicmaps=yes \
388
		dynamicmaps=yes \
390
	${POSTFIX_DYN_AUXLIBS} \
389
		${POSTFIX_DYN_AUXLIBS} \
391
	AUXLIBS="${POSTFIX_AUXLIBS}" && \
390
		AUXLIBS="${POSTFIX_AUXLIBS}"
392
	${ECHO_CMD} "all: default" >> Makefile)
393
391
394
pre-install-INST_BASE-on:
392
pre-install-INST_BASE-on:
395
	${MKDIR} ${STAGEDIR}/etc/rc.d
393
	${MKDIR} ${STAGEDIR}/etc/rc.d
396
394
397
do-install:
395
do-install:
398
	@(cd ${WRKSRC} && ${MAKE} non-interactive-package \
396
	${MAKE} -C ${WRKSRC} non-interactive-package \
399
		install_root=${STAGEDIR} tempdir=${WRKDIR} \
397
		install_root=${STAGEDIR} tempdir=${WRKDIR} \
400
		shlib_directory=${SHLIB_DIRECTORY} \
398
		shlib_directory=${SHLIB_DIRECTORY} \
401
		config_directory=${ETCDIR} \
399
		config_directory=${ETCDIR} \
Lines 407-413 do-install: Link Here
407
		manpage_directory=${PREFIX}/share/man \
405
		manpage_directory=${PREFIX}/share/man \
408
		newaliases_path=${PREFIX}/bin/newaliases \
406
		newaliases_path=${PREFIX}/bin/newaliases \
409
		readme_directory=${READMEDIR} \
407
		readme_directory=${READMEDIR} \
410
		sendmail_path=${PREFIX}/sbin/sendmail )
408
		sendmail_path=${PREFIX}/sbin/sendmail
411
409
412
	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${STAGEDIR}${PREFIX}/bin/rmail
410
	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${STAGEDIR}${PREFIX}/bin/rmail
413
	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${STAGEDIR}${PREFIX}/bin/qshape
411
	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${STAGEDIR}${PREFIX}/bin/qshape
(-)b/mail/postfix/files/pkg-install.in (-32 / +16 lines)
Lines 9-25 BATCH=${BATCH:=no} Link Here
9
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
9
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
10
10
11
# fixed vars
11
# fixed vars
12
PREFIX="%%PREFIX%%"
12
MC_TEMPLATE="${PKG_ROOTDIR}${PKG_PREFIX}/share/postfix/mailer.conf.postfix"
13
ETCDIR="%%ETCDIR%%"
14
DAEMONDIR="%%DAEMONDIR%%"
15
META_DIRECTORY="%%META_DIRECTORY%%"
16
READMEDIR="%%READMEDIR%%"
17
MC_TEMPLATE="%%DATADIR%%/mailer.conf.postfix"
18
13
19
# FreeBSD <= 10.3
14
# FreeBSD <= 10.3
20
MC_BASE="/etc/mail/mailer.conf"
15
MC_BASE="${PKG_ROOTDIR}etc/mail/mailer.conf"
21
# FreeBSD >= 10.3 (and current)
16
# FreeBSD >= 10.3 (and current)
22
MC_LOCALBASE="%%LOCALBASE%%/etc/mail/mailer.conf"
17
MC_LOCALBASE="${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail/mailer.conf"
23
USE_LOCALBASE_MAILER_CONF="%%USE_LOCALBASE_MAILER_CONF%%"
18
USE_LOCALBASE_MAILER_CONF="%%USE_LOCALBASE_MAILER_CONF%%"
24
19
25
if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
20
if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
Lines 54-60 show_not_activated_msg() { Link Here
54
	echo "To finish installation run the following commands:"
49
	echo "To finish installation run the following commands:"
55
	echo
50
	echo
56
	if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
51
	if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
57
		echo "  mkdir -p %%LOCALBASE%%/etc/mail"
52
		echo "  mkdir -p ${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail"
58
	else
53
	else
59
		echo "  mv -f ${mailerconf} ${mailerconf}.old"
54
		echo "  mv -f ${mailerconf} ${mailerconf}.old"
60
	fi
55
	fi
Lines 86-121 install_mailer_conf() { Link Here
86
	mailerconf=$1
81
	mailerconf=$1
87
	echo "Activate Postfix in ${mailerconf}"
82
	echo "Activate Postfix in ${mailerconf}"
88
	if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
83
	if [ "${USE_LOCALBASE_MAILER_CONF}" = "yes" ]; then
89
		[ -d %%LOCALBASE%%/etc/mail ] || mkdir -p %%LOCALBASE%%/etc/mail
84
		[ -d "${PKG_ROOTDIR}%%LOCALBASE%%/etc/mail" ] || \
85
		 mkdir -p "${PKG_ROOTDIR}/%LOCALBASE%%/etc/mail"
90
	fi
86
	fi
91
	[ -f ${mailerconf} ] && mv -f ${mailerconf} ${mailerconf}.old
87
	[ -f ${mailerconf} ] && mv -f ${mailerconf} ${mailerconf}.old
92
	install -m 644 ${MC_TEMPLATE} ${mailerconf}
88
	install -m 644 ${MC_TEMPLATE} ${mailerconf}
93
}
89
}
94
90
95
# ==============================================================================
91
show_needs_reload_msg(){
96
# Run postfix reload
92
	echo "==============================================================="
97
# This is a candidate for a dedicated pkg-post-upgrade script, but it seems
93
	echo "Postfix installation changed, please run 'postfix reload'"
98
# this not fully implemented in pkg :(see upstream PR 941)
94
	echo "==============================================================="
99
# ==============================================================================
100
try_reload(){
101
	${PREFIX}/sbin/postfix status 2>/dev/null
102
if [ $? -eq 0 ]; then
103
	${PREFIX}/sbin/postfix reload
104
else
105
	echo "postfix not running"
106
fi
107
}
95
}
108
96
109
# ==============================================================================
97
# ==============================================================================
110
# Run postfix post-install to fix permissions and new config values
98
# Fix permissions and new config values after installation
111
# ==============================================================================
99
# ==============================================================================
112
if [ "$2" = "POST-INSTALL" ]; then
100
if [ "$2" = "POST-INSTALL" ]; then
113
	/bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \
101
	chroot "${PKG_ROOTDIR}" \
114
	 daemon_directory=${DAEMONDIR} \
102
	 "${PKG_PREFIX}"/sbin/postfix set-permissions upgrade-configuration
115
 	 meta_directory=${META_DIRECTORY} \
116
	 html_directory=${READMEDIR} \
117
	 readme_directory=${READMEDIR} \
118
	 upgrade-package
119
fi
103
fi
120
104
121
# ==============================================================================
105
# ==============================================================================
Lines 130-136 if [ -f "${MC_BASE}" ]; then Link Here
130
		if [ $? -eq 0 ]; then
114
		if [ $? -eq 0 ]; then
131
			show_activated_msg ${MC_BASE}
115
			show_activated_msg ${MC_BASE}
132
			cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE}
116
			cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE}
133
			try_reload
117
			show_needs_reload_msg
134
		else
118
		else
135
			cmp_mailer ${MC_LOCALBASE} || install_choice ${MC_LOCALBASE}
119
			cmp_mailer ${MC_LOCALBASE} || install_choice ${MC_LOCALBASE}
136
		fi
120
		fi
Lines 140-146 if [ -f "${MC_BASE}" ]; then Link Here
140
			install_choice ${MC_BASE}
124
			install_choice ${MC_BASE}
141
		else
125
		else
142
			show_activated_msg ${MC_BASE}
126
			show_activated_msg ${MC_BASE}
143
			try_reload
127
			show_needs_reload_msg
144
		fi
128
		fi
145
	fi
129
	fi
146
130
Lines 151-154 else Link Here
151
		show_not_activated_msg ${MC_BASE}
135
		show_not_activated_msg ${MC_BASE}
152
	fi
136
	fi
153
fi # -f "${MC_BASE}"
137
fi # -f "${MC_BASE}"
154
fi # "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" 
138
fi # "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}"
(-)b/mail/postfix/pkg-plist (-2 / +1 lines)
Lines 119-125 share/man/man5/ldap_table.5.gz Link Here
119
share/man/man5/lmdb_table.5.gz
119
share/man/man5/lmdb_table.5.gz
120
share/man/man5/master.5.gz
120
share/man/man5/master.5.gz
121
share/man/man5/memcache_table.5.gz
121
share/man/man5/memcache_table.5.gz
122
%%MONGO%%share/man/man5/mongodb_table.5.gz
122
share/man/man5/mongodb_table.5.gz
123
share/man/man5/mysql_table.5.gz
123
share/man/man5/mysql_table.5.gz
124
share/man/man5/nisplus_table.5.gz
124
share/man/man5/nisplus_table.5.gz
125
share/man/man5/pcre_table.5.gz
125
share/man/man5/pcre_table.5.gz
126
- 

Return to bug 280019