blob: b0ed8e8c77a4ea742b9e16be0d6d0666c5733a7b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# New ports collection makefile for: smail
# Date created: 16 Oct 1994
# Whom: torstenb
#
# $FreeBSD$
#
PORTNAME= smail
PORTVERSION= 3.2.0.121
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.planix.com/pub/Smail/%SUBDIR%/ \
ftp://ftp.fu-berlin.de/unix/mail/smail/%SUBDIR%/
MASTER_SITE_SUBDIR= . OLD
MAINTAINER= ports@FreeBSD.org
COMMENT= A program used for receiving and delivering mail
BUILD_DEPENDS= ${LOCALBASE}/lib/libident.a:${PORTSDIR}/security/libident
LIB_DEPENDS= pcre.1:${PORTSDIR}/devel/pcre
CONFLICTS= bsmtp-1.* courier-0.* postfix-1.* postfix-2.* sendmail-8.* sendmail-*-8.* zmailer-2.*
.if !defined(NO_INSTALL_MANPAGES)
MAN1= pathto.1 uuwho.1 uupath.1
MAN5= smailconf.5 smail.5 smaildrct.5 smailmeth.5 smailqual.5 \
smailrtrs.5 smailrtry.5 smailtrns.5 aliases.5
MAN8= pathalias.8 mkdbm.8 mkline.8 mksort.8 mkaliases.8 smail.8 \
mkpath.8 pathmerge.8 checkerr.8 getmap.8 mkhpath.8 savelog.8 \
mkuuwho.8 mailq.8 sendmail.8 runq.8 rmail.8 rsmtp.8 smtpd.8 \
newaliases.8 smailbug.8 unfreezemail.8 bouncemail.8 logsumm.8
.endif
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
LIBS+= -lident -lwrap -lpcre
CYRUS_USER?= cyrus
CYRUS_GROUP?= cyrus
CYRUS_DELIVER_PATH?= ${LOCALBASE}/cyrus/bin/deliver
OPTIONS= CYRUS22 "Use mail/cyrus-imapd22 as local transport" off \
CYRUS23 "Use mail/cyrus-imapd23 as local transport" off \
REPLACE_CONF "Replace /etc/mail/mailer.conf" off
.include <bsd.port.pre.mk>
.if defined(WITH_CYRUS22) && defined(WITH_CYRUS23)
IGNORE= WITH_CYRUS22 and WITH_CYRUS23 are mutually exclusive. Please run make options again
.endif
.if defined(WITH_CYRUS22)
CYRUS_PORT= ${PORTSDIR}/mail/cyrus-imapd22
.else
CYRUS_PORT= ${PORTSDIR}/mail/cyrus-imapd23
.endif
.if defined(WITH_CYRUS22) || defined(WITH_CYRUS23)
RUN_DEPENDS+= cyrus/bin/deliver:${CYRUS_PORT}
CYRUS_IMAPD= USE_CYRUS_IMAPD
PLIST_SUB+= CYRUS_DELIVER=""
.else
PLIST_SUB+= CYRUS_DELIVER="@comment "
.endif
.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
ARCH_TYPE=64bit
.else
ARCH_TYPE=32bit
.endif
do-configure:
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%MANPREFIX%%|${MANPREFIX}|g' \
-e 's|%%CFLAGS%%|${CFLAGS}|g' \
-e 's|%%CPPFLAGS%%|${CPPFLAGS}|g' \
-e 's|%%LDFLAGS%%|${LDFLAGS}|g' \
-e 's|%%LIBS%%|${LIBS}|g' \
-e 's|%%ARCH_TYPE%%|${ARCH_TYPE}|g' \
-e 's|%%CYRUS_IMAPD%%|${CYRUS_IMAPD}|g' \
${FILESDIR}/freebsd5.in > ${WRKSRC}/conf/os/freebsd5
@${ECHO_CMD} OS_TYPE=freebsd5 > ${WRKSRC}/conf/EDITME
@${ECHO_CMD} STRIP=yes >> ${WRKSRC}/conf/EDITME
@${ECHO_CMD} CYRUS_USER="${CYRUS_USER}" >> ${WRKSRC}/conf/EDITME
@${ECHO_CMD} CYRUS_GROUP="${CYRUS_GROUP}" >> ${WRKSRC}/conf/EDITME
@${ECHO_CMD} CYRUS_DELIVER_PATH="${CYRUS_DELIVER_PATH}" >> ${WRKSRC}/conf/EDITME
@${LN} -sf ${WRKSRC}/conf/Make.local-BSD ${WRKSRC}/conf/Make.local
@${REINPLACE_CMD} -e 's|defs install|defs|g' \
${WRKSRC}/man/Makefile
@${ECHO_CMD} >> ${WRKSRC}/man/Makefile
@${ECHO_CMD} install: >> ${WRKSRC}/man/Makefile
pre-install:
@${MKDIR} ${PREFIX}/etc/smail
post-install:
.if defined(WITH_REPLACE_CONF)
@make replace
.endif
.if defined(WITH_CYRUS22) || defined(WITH_CYRUS23)
@cd ${WRKSRC}/util && make install-cyrus-bins
.endif
.if !defined(NO_INSTALL_MANPAGES)
@cd ${WRKSRC}/man && make installman
.endif
replace:
@${ECHO_MSG} "===> Activating smail in /etc/mail/mailer.conf"
${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
@${ECHO_CMD} "#" > /etc/mail/mailer.conf
@${ECHO_CMD} -n "# Execute the smail sendmail program" >> /etc/mail/mailer.conf
@${ECHO_CMD} ", named ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
@${ECHO_CMD} "#" >> /etc/mail/mailer.conf
@${ECHO_CMD} "sendmail ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
@${ECHO_CMD} "send-mail ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
@${ECHO_CMD} "mailq ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
@${ECHO_CMD} "newaliases ${PREFIX}/bin/smail" >> /etc/mail/mailer.conf
.include <bsd.port.post.mk>
|