summaryrefslogtreecommitdiff
path: root/mail/smail
diff options
context:
space:
mode:
authorPete Fritchman <petef@FreeBSD.org>2001-09-21 17:14:35 +0000
committerPete Fritchman <petef@FreeBSD.org>2001-09-21 17:14:35 +0000
commitc1ceb9e7eb8580a8cc39cce439212a445632ee7f (patch)
tree03a211364d36a6cac5bc38a326981bf4eb4951de /mail/smail
parentAdd missing file to pkg-plist (diff)
- have 'make replace' modify mailer.conf if OSVERSION > 400014 (mostly
borrowed from mail/posfix) - instead of copying the smail binary around, use symlinks - add @execs to pkg-plist to create empty directories the port needs PR: 21900 (mailer.conf)
Diffstat (limited to 'mail/smail')
-rw-r--r--mail/smail/Makefile25
-rw-r--r--mail/smail/pkg-plist2
2 files changed, 22 insertions, 5 deletions
diff --git a/mail/smail/Makefile b/mail/smail/Makefile
index 6cd76e70e2ae..5e0bf7e1bc53 100644
--- a/mail/smail/Makefile
+++ b/mail/smail/Makefile
@@ -35,8 +35,22 @@ post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} " make replace"
+.include <bsd.port.pre.mk>
+
replace:
- @${ECHO_MSG} "===> Replacing sendmail"
+.if ${OSVERSION} >= 400014
+ @${ECHO_MSG} "===> Activating smail in /etc/mail/mailer.conf"
+ ${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
+ @${ECHO} "#" > /etc/mail/mailer.conf
+ @${ECHO} -n "# Execute the smail sendmail program" >> /etc/mail/mailer.conf
+ @${ECHO} ", named ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
+ @${ECHO} "#" >> /etc/mail/mailer.conf
+ @${ECHO} "sendmail ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
+ @${ECHO} "send-mail ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
+ @${ECHO} "mailq ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
+ @${ECHO} "newaliases ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
+.else
+ @${ECHO_MSG} "===> Replacing sendmail programs"
if [ -e /usr/sbin/sendmail ]; then \
${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.BAK; \
if [ -f /usr/sbin/sendmail.BAK ]; then \
@@ -44,7 +58,7 @@ replace:
fi;\
fi
if [ -e ${PREFIX}/bin/smail ]; then \
- ${CP} -fp ${PREFIX}/bin/smail /usr/sbin/sendmail; \
+ ${LN} -s ${PREFIX}/bin/smail /usr/sbin/sendmail; \
fi
if [ -f /usr/sbin/mailstats ]; then \
${CHMOD} 0 /usr/sbin/mailstats; \
@@ -56,7 +70,7 @@ replace:
fi;\
fi
if [ -e ${PREFIX}/bin/newaliases ]; then \
- ${CP} -fp ${PREFIX}/bin/newaliases /usr/bin/newaliases; \
+ ${LN} -s ${PREFIX}/bin/newaliases /usr/bin/newaliases; \
fi
if [ -e /usr/bin/mailq ]; then \
${MV} -f /usr/bin/mailq /usr/bin/mailq.BAK; \
@@ -65,7 +79,8 @@ replace:
fi;\
fi
if [ -e ${PREFIX}/bin/mailq ]; then \
- ${CP} -fp ${PREFIX}/bin/mailq /usr/bin/mailq; \
+ ${LN} -s ${PREFIX}/bin/mailq /usr/bin/mailq; \
fi
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/mail/smail/pkg-plist b/mail/smail/pkg-plist
index cac3a131b794..1412e7c770ca 100644
--- a/mail/smail/pkg-plist
+++ b/mail/smail/pkg-plist
@@ -13,6 +13,8 @@ bin/uuwho
etc/smail/COPYING
etc/smail/forcepaths
etc/smail/forcesmtp
+@exec mkdir -p %D/etc/smail/maps
+@exec mkdir -p %D/etc/smail/methods
etc/smail/paths
libexec/smail/bouncemail
libexec/smail/checkerr