aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/postfix-current/Makefile37
-rw-r--r--mail/postfix-current/distinfo2
-rw-r--r--mail/postfix-current/pkg-install77
-rw-r--r--mail/postfix-current/pkg-plist4
-rw-r--r--mail/postfix/Makefile37
-rw-r--r--mail/postfix/distinfo2
-rw-r--r--mail/postfix/pkg-install77
-rw-r--r--mail/postfix/pkg-plist4
-rw-r--r--mail/postfix1/Makefile37
-rw-r--r--mail/postfix1/distinfo2
-rw-r--r--mail/postfix1/pkg-install77
-rw-r--r--mail/postfix1/pkg-plist4
-rw-r--r--mail/postfix20/Makefile37
-rw-r--r--mail/postfix20/distinfo2
-rw-r--r--mail/postfix20/pkg-install77
-rw-r--r--mail/postfix20/pkg-plist4
-rw-r--r--mail/postfix21/Makefile37
-rw-r--r--mail/postfix21/distinfo2
-rw-r--r--mail/postfix21/pkg-install77
-rw-r--r--mail/postfix21/pkg-plist4
-rw-r--r--mail/postfix22/Makefile37
-rw-r--r--mail/postfix22/distinfo2
-rw-r--r--mail/postfix22/pkg-install77
-rw-r--r--mail/postfix22/pkg-plist4
-rw-r--r--mail/postfix23/Makefile37
-rw-r--r--mail/postfix23/distinfo2
-rw-r--r--mail/postfix23/pkg-install77
-rw-r--r--mail/postfix23/pkg-plist4
-rw-r--r--mail/postfix24/Makefile37
-rw-r--r--mail/postfix24/distinfo2
-rw-r--r--mail/postfix24/pkg-install77
-rw-r--r--mail/postfix24/pkg-plist4
-rw-r--r--mail/postfix25/Makefile37
-rw-r--r--mail/postfix25/distinfo2
-rw-r--r--mail/postfix25/pkg-install77
-rw-r--r--mail/postfix25/pkg-plist4
-rw-r--r--mail/postfix26/Makefile37
-rw-r--r--mail/postfix26/distinfo2
-rw-r--r--mail/postfix26/pkg-install77
-rw-r--r--mail/postfix26/pkg-plist4
-rw-r--r--mail/postfix27/Makefile37
-rw-r--r--mail/postfix27/distinfo2
-rw-r--r--mail/postfix27/pkg-install77
-rw-r--r--mail/postfix27/pkg-plist4
-rw-r--r--mail/postfix28/Makefile37
-rw-r--r--mail/postfix28/distinfo2
-rw-r--r--mail/postfix28/pkg-install77
-rw-r--r--mail/postfix28/pkg-plist4
48 files changed, 768 insertions, 672 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix-current/distinfo
+++ b/mail/postfix-current/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix-current/pkg-install b/mail/postfix-current/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix-current/pkg-install
+++ b/mail/postfix-current/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix-current/pkg-plist b/mail/postfix-current/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix-current/pkg-plist
+++ b/mail/postfix-current/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix/distinfo
+++ b/mail/postfix/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix/pkg-install b/mail/postfix/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix/pkg-install
+++ b/mail/postfix/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix/pkg-plist b/mail/postfix/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix/pkg-plist
+++ b/mail/postfix/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix1/Makefile b/mail/postfix1/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix1/Makefile
+++ b/mail/postfix1/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix1/distinfo b/mail/postfix1/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix1/distinfo
+++ b/mail/postfix1/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix1/pkg-install b/mail/postfix1/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix1/pkg-install
+++ b/mail/postfix1/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix1/pkg-plist b/mail/postfix1/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix1/pkg-plist
+++ b/mail/postfix1/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix20/Makefile b/mail/postfix20/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix20/Makefile
+++ b/mail/postfix20/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix20/distinfo b/mail/postfix20/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix20/distinfo
+++ b/mail/postfix20/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix20/pkg-install b/mail/postfix20/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix20/pkg-install
+++ b/mail/postfix20/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix20/pkg-plist b/mail/postfix20/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix20/pkg-plist
+++ b/mail/postfix20/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix21/Makefile b/mail/postfix21/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix21/Makefile
+++ b/mail/postfix21/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix21/distinfo b/mail/postfix21/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix21/distinfo
+++ b/mail/postfix21/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix21/pkg-install b/mail/postfix21/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix21/pkg-install
+++ b/mail/postfix21/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix21/pkg-plist b/mail/postfix21/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix21/pkg-plist
+++ b/mail/postfix21/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix22/Makefile b/mail/postfix22/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix22/Makefile
+++ b/mail/postfix22/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix22/distinfo b/mail/postfix22/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix22/distinfo
+++ b/mail/postfix22/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix22/pkg-install b/mail/postfix22/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix22/pkg-install
+++ b/mail/postfix22/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix22/pkg-plist b/mail/postfix22/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix22/pkg-plist
+++ b/mail/postfix22/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix23/Makefile b/mail/postfix23/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix23/Makefile
+++ b/mail/postfix23/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix23/distinfo b/mail/postfix23/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix23/distinfo
+++ b/mail/postfix23/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix23/pkg-install b/mail/postfix23/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix23/pkg-install
+++ b/mail/postfix23/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix23/pkg-plist b/mail/postfix23/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix23/pkg-plist
+++ b/mail/postfix23/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix24/Makefile b/mail/postfix24/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix24/Makefile
+++ b/mail/postfix24/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix24/distinfo b/mail/postfix24/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix24/distinfo
+++ b/mail/postfix24/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix24/pkg-install b/mail/postfix24/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix24/pkg-install
+++ b/mail/postfix24/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix24/pkg-plist b/mail/postfix24/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix24/pkg-plist
+++ b/mail/postfix24/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix25/Makefile b/mail/postfix25/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix25/Makefile
+++ b/mail/postfix25/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix25/distinfo b/mail/postfix25/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix25/distinfo
+++ b/mail/postfix25/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix25/pkg-install b/mail/postfix25/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix25/pkg-install
+++ b/mail/postfix25/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix25/pkg-plist b/mail/postfix25/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix25/pkg-plist
+++ b/mail/postfix25/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix26/Makefile b/mail/postfix26/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix26/Makefile
+++ b/mail/postfix26/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix26/distinfo b/mail/postfix26/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix26/distinfo
+++ b/mail/postfix26/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix26/pkg-install b/mail/postfix26/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix26/pkg-install
+++ b/mail/postfix26/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix26/pkg-plist b/mail/postfix26/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix26/pkg-plist
+++ b/mail/postfix26/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix27/Makefile b/mail/postfix27/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix27/Makefile
+++ b/mail/postfix27/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix27/distinfo b/mail/postfix27/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix27/distinfo
+++ b/mail/postfix27/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix27/pkg-install b/mail/postfix27/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix27/pkg-install
+++ b/mail/postfix27/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix27/pkg-plist b/mail/postfix27/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix27/pkg-plist
+++ b/mail/postfix27/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true
diff --git a/mail/postfix28/Makefile b/mail/postfix28/Makefile
index 8da005d8623b..bc3a5c4c17be 100644
--- a/mail/postfix28/Makefile
+++ b/mail/postfix28/Makefile
@@ -6,8 +6,8 @@
# $FreeBSD$
#
-DISTNAME= postfix-19991231-pl03
-PKGNAME= postfix-19991231.03
+DISTNAME= postfix-19991231-pl04
+PKGNAME= postfix-19991231.04
CATEGORIES= mail
MASTER_SITES= ftp://ftp.merit.edu/postfix/official/ \
ftp://ftp.snoopy.net/pub/mirrors/postfix/official/ \
@@ -22,17 +22,17 @@ MAINTAINER= torstenb@FreeBSD.org
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_MYSQL) && ${USE_MYSQL} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
-POSTFIX_CCARGS+= -DHAS_MYSQL -I${PREFIX}/include/mysql
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/mysql/libmysqlclient.a -lm
+BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
+POSTFIX_CCARGS+= -DHAS_MYSQL -I${LOCALBASE}/include/mysql
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/mysql/libmysqlclient.a -lm
.endif
# WARNING: this is based on a patch submitted by a user and has not been
# tested. Use it at your own risk !
.if defined(USE_LDAP) && ${USE_LDAP} == YES
-BUILD_DEPENDS+= ${PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap
-POSTFIX_CCARGS+= -DHAS_LDAP -I${PREFIX}/include
-POSTFIX_AUXLIBS+= ${PREFIX}/lib/libldap.a ${PREFIX}/lib/liblber.a
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libldap.a:${PORTSDIR}/net/openldap
+POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+= ${LOCALBASE}/lib/libldap.a ${PREFIX}/lib/liblber.a
.endif
ALL_TARGET= CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}"
@@ -58,7 +58,6 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
${PREFIX}/etc/postfix/sample-$$f ; \
done
- @exit
@for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
sample-rate.cf sample-relocated.cf sample-resource.cf \
@@ -75,12 +74,13 @@ do-install:
${INSTALL} -C -o root -g wheel -m 0755 -s \
${WRKSRC}/libexec/$$f ${PREFIX}/libexec/postfix/$$f ;\
done
- @for f in postalias postcat postconf postdrop postfix postkick \
- postlock postlog postmap postsuper sendmail smtp-sink \
- smtp-source ; do \
+ @for f in postalias postcat postconf postfix postkick postlock postlog\
+ postmap postsuper sendmail smtp-sink smtp-source ; do \
${INSTALL} -C -o root -g wheel -m 0755 -s ${WRKSRC}/bin/$$f \
${PREFIX}/sbin/$$f ;\
done
+ @${INSTALL} -C -o root -g maildrop -m 2755 -s ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
@for f in ${MAN1} ; do \
${INSTALL} -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
${PREFIX}/man/man1/$$f ;\
@@ -94,21 +94,16 @@ do-install:
${PREFIX}/man/man8/$$f ;\
done
@${MKDIR} -m 0755 /var/spool/postfix
- @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
- ${PREFIX}/etc/postfix/main.cf; \
- fi
- @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
- ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
- ${PREFIX}/etc/postfix/master.cf; \
- fi
@${ECHO_MSG} "--------------------------------------------------"
@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
@${ECHO_MSG} "- type \"make replace\" -"
@${ECHO_MSG} "--------------------------------------------------"
+pre-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
+
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
replace:
@${ECHO_MSG} "===> Replacing sendmail"
diff --git a/mail/postfix28/distinfo b/mail/postfix28/distinfo
index 622c5106986c..b81e8ba3c9ee 100644
--- a/mail/postfix28/distinfo
+++ b/mail/postfix28/distinfo
@@ -1 +1 @@
-MD5 (postfix-19991231-pl03.tar.gz) = a68c8f2d4d077f455e3aa2e441852f88
+MD5 (postfix-19991231-pl04.tar.gz) = 4a57993049e0e1a092494272398a78e7
diff --git a/mail/postfix28/pkg-install b/mail/postfix28/pkg-install
index 7b4849639b05..4ed960fb5bdc 100644
--- a/mail/postfix28/pkg-install
+++ b/mail/postfix28/pkg-install
@@ -33,45 +33,58 @@ yesno() {
done
}
-if pw groupshow "${group}" 2>/dev/null; then
- echo "You already have a group \"${group}\", so I will use it."
-else
- echo "You need a group \"${group}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group} -h - || exit
- echo "Done."
+if [ x"$2" = xPRE-INSTALL ]; then
+ if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw groupshow "${group2}" 2>/dev/null; then
- echo "You already have a group \"${group2}\", so I will use it."
-else
- echo "You need a group \"${group2}\"."
- if yesno "Would you like me to create it" y; then
- pw groupadd ${group2} -h - || exit
- echo "Done."
+ if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
-fi
-if pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
-else
- echo "You need a user \"${user}\"."
- if yesno "Would you like me to create it" y; then
- pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Postfix Mail System" || exit
- echo "Done."
+ if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
fi
+
fi
-chown root:maildrop ${PREFIX}/sbin/postdrop
-chmod 2755 ${PREFIX}/sbin/postdrop
+if [ x"$2" = xPOST-INSTALL ]; then
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/main.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-main.cf \
+ ${PKG_PREFIX}/etc/postfix/main.cf
+ fi
+ if [ ! -e ${PKG_PREFIX}/etc/postfix/master.cf ]; then
+ cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
+ ${PKG_PREFIX}/etc/postfix/master.cf
+ fi
+ chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
+ chmod 2755 ${PKG_PREFIX}/sbin/postdrop
+fi
diff --git a/mail/postfix28/pkg-plist b/mail/postfix28/pkg-plist
index 8fa639631947..af5f26a4396c 100644
--- a/mail/postfix28/pkg-plist
+++ b/mail/postfix28/pkg-plist
@@ -1,6 +1,4 @@
etc/postfix/LICENSE
-etc/postfix/main.cf
-etc/postfix/master.cf
etc/postfix/postfix-script
etc/postfix/sample-access
etc/postfix/sample-aliases.cf
@@ -47,3 +45,5 @@ sbin/smtp-sink
sbin/smtp-source
@exec mkdir -p -m 0755 /var/spool/postfix
@exec chown root:wheel /var/spool/postfix
+@dirrm libexec/postfix
+@unexec rmdir %D/etc/postfix 2>/dev/null || true