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

(-)postfix-current/Makefile (-98 / +116 lines)
Lines 25-36 Link Here
25
.endif
25
.endif
26
26
27
.if defined(CC)
27
.if defined(CC)
28
MAKEFILEFLAGS+= CC=$(CC)
28
MAKEFILEFLAGS+= CC=${CC}
29
.endif
29
.endif
30
30
31
.if defined(OPT)
31
MAKEFILEFLAGS+= OPT="${CFLAGS}"
32
MAKEFILEFLAGS+= OPT=$(OPT)
33
.endif
34
32
35
.if defined(WITH_MYSQL)
33
.if defined(WITH_MYSQL)
36
BUILD_DEPENDS+=		${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
34
BUILD_DEPENDS+=		${LOCALBASE}/lib/mysql/libmysqlclient.a:${PORTSDIR}/databases/mysql322-client
Lines 56-61 Link Here
56
POSTFIX_AUXLIBS+=	${LOCALBASE}/lib/libsasl.a -lpam -lcrypt
54
POSTFIX_AUXLIBS+=	${LOCALBASE}/lib/libsasl.a -lpam -lcrypt
57
.endif
55
.endif
58
56
57
CONF1=	access aliases canonical main.cf master.cf \
58
	regexp_table relocated transport virtual
59
60
CONF2=	sample-aliases.cf sample-canonical.cf sample-debug.cf \
61
	sample-filter.cf sample-local.cf sample-misc.cf \
62
	sample-rate.cf sample-regexp.cf sample-relocated.cf \
63
	sample-resource.cf sample-rewrite.cf sample-smtp.cf \
64
	sample-smtpd.cf sample-transport.cf sample-virtual.cf
65
66
BIN1=	bounce cleanup error lmtp local master nqmgr pickup \
67
	pipe qmgr showq smtp smtpd trivial-rewrite
68
69
BIN2=	postalias postcat postconf postdrop postfix \
70
	postkick postlog postmap postsuper sendmail
71
59
MAN1=	mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
72
MAN1=	mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
60
	postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
73
	postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
61
	sendmail.1
74
	sendmail.1
Lines 63-74 Link Here
63
MAN5=	access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \
76
MAN5=	access.5 aliases.5 canonical.5 regexp_table.5 relocated.5 \
64
	transport.5 virtual.5
77
	transport.5 virtual.5
65
78
79
MAN8=	bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \
80
	pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8
81
66
.ifdef(WITH_PCRE)
82
.ifdef(WITH_PCRE)
67
MAN5+=	pcre_table.5
83
CONF1+=		pcre_table
84
CONF2+=		sample-pcre.cf
85
MAN5+=		pcre_table.5
86
PLIST_SUB+=	WITH_PCRE=""
87
.else
88
PLIST_SUB+=	WITH_PCRE="@comment "
68
.endif
89
.endif
69
90
70
MAN8=	bounce.8 cleanup.8 defer.8 error.8 lmtp.8 local.8 master.8 \
91
.ifdef(WITH_SASL)
71
	pickup.8 pipe.8 qmgr.8 showq.8 smtp.8 smtpd.8 trivial-rewrite.8
92
CONF2+=		sample-auth.cf
93
PLIST_SUB+=	WITH_SASL=""
94
.else
95
PLIST_SUB+=	WITH_SASL="@comment "
96
.endif
97
98
.ifdef(WITH_LDAP)
99
CONF2+=		sample-ldap.cf
100
PLIST_SUB+=	WITH_LDAP=""
101
.else
102
PLIST_SUB+=	WITH_LDAP="@comment "
103
.endif
104
105
DOCDIR=	${PREFIX}/share/doc/postfix
72
106
73
post-patch:
107
post-patch:
74
	(cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \
108
	(cd ${WRKSRC} && make -f Makefile.init makefiles ${MAKEFILEFLAGS} \
Lines 76-180 Link Here
76
	${ECHO} "all: default" >> Makefile)
110
	${ECHO} "all: default" >> Makefile)
77
111
78
pre-install:
112
pre-install:
79
	@/bin/sh @${PKGDIR}/INSTALL Postfix PRE-INSTALL
113
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
80
81
do-install:
82
	@${MKDIR} -m 755 ${PREFIX}/etc/postfix
83
	@${CHOWN} root:wheel ${PREFIX}/etc/postfix
84
	@${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
85
		${PREFIX}/etc/postfix/LICENSE
86
87
	@for f in access aliases canonical main.cf master.cf \
88
		regexp_table relocated transport virtual ; do \
89
			${INSTALL} -C -o root -g wheel -m 0644 \
90
			${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/sample-$$f ; \
91
	done
92
93
.if defined(WITH_PCRE)
94
	@${INSTALL} -C -o root -g wheel -m 0644 ${WRKSRC}/conf/pcre_table \
95
		${PREFIX}/etc/postfix/sample-pcre_table
96
.endif
97
98
	@for f in sample-aliases.cf sample-canonical.cf \
99
		sample-debug.cf sample-filter.cf sample-ldap.cf \
100
		sample-local.cf sample-misc.cf sample-rate.cf \
101
		sample-regexp.cf sample-relocated.cf sample-resource.cf \
102
		sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
103
		sample-transport.cf sample-virtual.cf ; do \
104
			${INSTALL} -C -o root -g wheel -m 0644 \
105
			${WRKSRC}/conf/$$f ${PREFIX}/etc/postfix/$$f ; \
106
	done
107
114
108
.if defined(WITH_PCRE)
115
post-install:
109
	@${INSTALL} -C -o root -g wheel -m 0644 \
116
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
110
		${WRKSRC}/conf/sample-pcre.cf \
111
		${PREFIX}/etc/postfix/sample-pcre.cf
112
.endif
113
117
114
.if defined(WITH_SASL)
118
do-install:
115
	@${INSTALL} -C -o root -g wheel -m 0644 \
119
	@${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \
116
		${WRKSRC}/conf/sample-auth.cf \
120
		${PREFIX}/etc/postfix \
117
		${PREFIX}/etc/postfix/sample-auth.cf
121
		${PREFIX}/libexec/postfix \
118
.endif
122
		/var/spool/postfix
119
123
	@${INSTALL_DATA} ${WRKSRC}/conf/LICENSE ${PREFIX}/etc/postfix
120
	@${MKDIR} -m 755 ${PREFIX}/libexec/postfix
124
121
	@${CHOWN} root:wheel ${PREFIX}/libexec/postfix
125
.for file in ${CONF1}
122
126
	@${INSTALL_DATA} \
123
	@for f in bounce cleanup error lmtp local master nqmgr pickup \
127
		${WRKSRC}/conf/${file} \
124
		pipe qmgr showq smtp smtpd trivial-rewrite ; do \
128
		${PREFIX}/etc/postfix/sample-${file}
125
		${INSTALL} -C -o root -g wheel -m 0755 \
129
.endfor
126
			${WRKSRC}/libexec/$$f \
130
127
			${PREFIX}/libexec/postfix/$$f ; \
131
.for file in ${CONF2}
128
	done
132
	@${INSTALL_DATA} \
129
133
		${WRKSRC}/conf/${file} \
130
	@for f in postalias postcat postconf postfix postkick postlog \
134
		${PREFIX}/etc/postfix
131
		postmap postsuper sendmail ; do \
135
.endfor
132
		${INSTALL} -C -o root -g wheel -m 0755 \
136
133
			${WRKSRC}/$$f/$$f ${PREFIX}/sbin/$$f ; \
137
	@${INSTALL_SCRIPT} \
134
	done
138
		${WRKSRC}/conf/postfix-script-sgid \
135
139
		${PREFIX}/etc/postfix/postfix-script
136
	@${INSTALL} -C -o root -g maildrop -m 2755 \
140
137
		${WRKSRC}/postdrop/postdrop ${PREFIX}/sbin/postdrop
141
.for file in ${BIN1}
138
142
	@${INSTALL_PROGRAM} \
139
	@for f in ${MAN1} ; do \
143
		${WRKSRC}/libexec/${file} \
140
		${INSTALL} -C -o root -g wheel -m 0644 \
144
		${PREFIX}/libexec/postfix
141
		${WRKSRC}/man/man1/$$f ${PREFIX}/man/man1/$$f ; \
145
.endfor
142
	done
146
143
147
.for file in ${BIN2}
144
	@for f in ${MAN5} ; do \
148
	@${INSTALL_PROGRAM} \
145
		${INSTALL} -C -o root -g wheel -m 0644 \
149
		${WRKSRC}/${file}/${file} \
146
		${WRKSRC}/man/man5/$$f ${PREFIX}/man/man5/$$f ; \
150
		${PREFIX}/sbin
147
	done
151
.endfor
148
152
149
	@for f in ${MAN8} ; do \
153
.for file in ${MAN1}
150
		${INSTALL} -C -o root -g wheel -m 0644 \
154
	@${INSTALL_MAN} \
151
		${WRKSRC}/man/man8/$$f ${PREFIX}/man/man8/$$f ; \
155
		${WRKSRC}/man/man1/${file} \
152
	done
156
		${PREFIX}/man/man1
153
157
.endfor
154
	@${MKDIR} -m 755 /var/spool/postfix
158
155
	@${CHOWN} root:wheel /var/spool/postfix
159
.for file in ${MAN5}
156
160
	@${INSTALL_MAN} \
157
	@${MKDIR} -m 755 ${PREFIX}/share/doc/postfix
161
		${WRKSRC}/man/man5/${file} \
158
	@${INSTALL} -d -m 555 -o root -g wheel ${PREFIX}/share/doc/postfix
162
		${PREFIX}/man/man5
159
	@cd ${WRKSRC} && ${INSTALL_DATA} \
163
.endfor
160
		html/*.html html/*.gif ${PREFIX}/share/doc && \
164
161
		${ECHO_MSG} "Installed HTML documentation in ${PREFIX}/share/doc"
165
.for file in ${MAN8}
162
166
	@${INSTALL_MAN} \
163
	@${ECHO_MSG} "--------------------------------------------------"
167
		${WRKSRC}/man/man8/${file} \
164
	@${ECHO_MSG} "- To replace your existing sendmail with postfix -"
168
		${PREFIX}/man/man8
165
	@${ECHO_MSG} "- type \"make replace\"                          -"
169
.endfor
166
	@${ECHO_MSG} "--------------------------------------------------"
170
171
.if !defined(NOPORTDOCS)
172
	@${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCDIR}
173
	@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.gif ${DOCDIR} && \
174
		${ECHO_MSG} "Installed HTML documentation in ${DOCDIR}"
175
.endif
176
177
	@${ECHO_MSG} '--------------------------------------------------'
178
	@${ECHO_MSG} '- To replace your existing sendmail with postfix -'
179
	@${ECHO_MSG} '- type "make replace"                            -'
180
	@${ECHO_MSG} '--------------------------------------------------'
167
181
168
.include <bsd.port.pre.mk>
182
.include <bsd.port.pre.mk>
169
183
170
replace:
184
replace:
171
.if ${OSVERSION} >= 400014
185
.if ${OSVERSION} >= 400014
172
	@${ECHO_MSG} "===> Activating postfix in /etc/mail/mailer.conf"
186
	@${ECHO_MSG} "===>  Activating postfix in /etc/mail/mailer.conf"
173
	${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
187
	${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.bak
174
	${ECHO} 'sendmail       ${PREFIX}/sbin/sendmail' > /etc/mail/mailer.conf
188
	${ECHO} "#" > /etc/mail/mailer.conf
175
	${ECHO} 'send-mail      ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf
189
	${ECHO} -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf
176
	${ECHO} 'mailq          ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf
190
	${ECHO} ", named /usr/local/sbin/sendmail" >> /etc/mail/mailer.conf
177
	${ECHO} 'newaliases     ${PREFIX}/sbin/sendmail' >>/etc/mail/mailer.conf
191
	${ECHO} "#" >> /etc/mail/mailer.conf
192
	${ECHO} "sendmail	${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf
193
	${ECHO} "send-mail      ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf
194
	${ECHO} "mailq          ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf
195
	${ECHO} "newaliases     ${PREFIX}/sbin/sendmail" >>/etc/mail/mailer.conf
178
.else
196
.else
179
	@${ECHO_MSG} "===> Replacing sendmail"
197
	@${ECHO_MSG} "===> Replacing sendmail"
180
	@if [ -e /usr/sbin/sendmail ]; then \
198
	@if [ -e /usr/sbin/sendmail ]; then \
(-)postfix-current/pkg/INSTALL (-2 / +3 lines)
Lines 85-90 Link Here
85
        cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
85
        cp -p ${PKG_PREFIX}/etc/postfix/sample-master.cf \
86
	    ${PKG_PREFIX}/etc/postfix/master.cf
86
	    ${PKG_PREFIX}/etc/postfix/master.cf
87
    fi
87
    fi
88
    chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
88
    /usr/sbin/chown root:maildrop ${PKG_PREFIX}/sbin/postdrop
89
    chmod 2755 ${PKG_PREFIX}/sbin/postdrop
89
    /bin/chmod 2555 ${PKG_PREFIX}/sbin/postdrop
90
    ${PKG_PREFIX}/sbin/postfix check
90
fi
91
fi
(-)postfix-current/pkg/PLIST (-43 / +13 lines)
Lines 1-28 Link Here
1
etc/postfix/LICENSE
1
etc/postfix/LICENSE
2
etc/postfix/postfix-script
2
etc/postfix/sample-access
3
etc/postfix/sample-access
3
etc/postfix/sample-aliases
4
etc/postfix/sample-aliases
4
etc/postfix/sample-canonical
5
etc/postfix/sample-main.cf
6
etc/postfix/sample-master.cf
7
etc/postfix/sample-regexp_table
8
etc/postfix/sample-relocated
9
etc/postfix/sample-transport
10
etc/postfix/sample-virtual
11
etc/postfix/sample-aliases.cf
5
etc/postfix/sample-aliases.cf
6
%%WITH_SASL%%etc/postfix/sample-auth.cf
7
etc/postfix/sample-canonical
12
etc/postfix/sample-canonical.cf
8
etc/postfix/sample-canonical.cf
13
etc/postfix/sample-debug.cf
9
etc/postfix/sample-debug.cf
14
etc/postfix/sample-filter.cf
10
etc/postfix/sample-filter.cf
15
etc/postfix/sample-ldap.cf
11
%%WITH_LDAP%%etc/postfix/sample-ldap.cf
16
etc/postfix/sample-local.cf
12
etc/postfix/sample-local.cf
13
etc/postfix/sample-main.cf
14
etc/postfix/sample-master.cf
17
etc/postfix/sample-misc.cf
15
etc/postfix/sample-misc.cf
16
%%WITH_PCRE%%etc/postfix/sample-pcre.cf
17
%%WITH_PCRE%%etc/postfix/sample-pcre_table
18
etc/postfix/sample-rate.cf
18
etc/postfix/sample-rate.cf
19
etc/postfix/sample-regexp.cf
19
etc/postfix/sample-regexp.cf
20
etc/postfix/sample-regexp_table
21
etc/postfix/sample-relocated
20
etc/postfix/sample-relocated.cf
22
etc/postfix/sample-relocated.cf
21
etc/postfix/sample-resource.cf
23
etc/postfix/sample-resource.cf
22
etc/postfix/sample-rewrite.cf
24
etc/postfix/sample-rewrite.cf
23
etc/postfix/sample-smtp.cf
25
etc/postfix/sample-smtp.cf
24
etc/postfix/sample-smtpd.cf
26
etc/postfix/sample-smtpd.cf
27
etc/postfix/sample-transport
25
etc/postfix/sample-transport.cf
28
etc/postfix/sample-transport.cf
29
etc/postfix/sample-virtual
26
etc/postfix/sample-virtual.cf
30
etc/postfix/sample-virtual.cf
27
libexec/postfix/bounce
31
libexec/postfix/bounce
28
libexec/postfix/cleanup
32
libexec/postfix/cleanup
Lines 38-77 Link Here
38
libexec/postfix/smtp
42
libexec/postfix/smtp
39
libexec/postfix/smtpd
43
libexec/postfix/smtpd
40
libexec/postfix/trivial-rewrite
44
libexec/postfix/trivial-rewrite
41
man/man1/mailq.1.gz
42
man/man1/postalias.1.gz
43
man/man1/postcat.1.gz
44
man/man1/postconf.1.gz
45
man/man1/postdrop.1.gz
46
man/man1/postfix.1.gz
47
man/man1/postlock.1.gz
48
man/man1/postlog.1.gz
49
man/man1/postmap.1.gz
50
man/man1/postsuper.1.gz
51
man/man1/sendmail.1.gz
52
man/man1/newaliases.1.gz
53
man/man1/postkick.1.gz
54
man/man5/access.5.gz
55
man/man5/canonical.5.gz
56
man/man5/regexp_table.5.gz
57
man/man5/relocated.5.gz
58
man/man5/transport.5.gz
59
man/man5/virtual.5.gz
60
man/man5/aliases.5.gz
61
man/man8/bounce.8.gz
62
man/man8/defer.8.gz
63
man/man8/error.8.gz
64
man/man8/lmtp.8.gz
65
man/man8/local.8.gz
66
man/man8/master.8.gz
67
man/man8/pickup.8.gz
68
man/man8/pipe.8.gz
69
man/man8/qmgr.8.gz
70
man/man8/smtp.8.gz
71
man/man8/smtpd.8.gz
72
man/man8/cleanup.8.gz
73
man/man8/showq.8.gz
74
man/man8/trivial-rewrite.8.gz
75
sbin/postalias
45
sbin/postalias
76
sbin/postcat
46
sbin/postcat
77
sbin/postconf
47
sbin/postconf
Lines 84-87 Link Here
84
sbin/sendmail
54
sbin/sendmail
85
@dirrm etc/postfix
55
@dirrm etc/postfix
86
@dirrm libexec/postfix
56
@dirrm libexec/postfix
87
@dirrm /var/spool/postfix
57
@unexec rm -rf /var/spool/postfix

Return to bug 21439