| @@ -1,170 +1,170 @@ | | | @@ -1,170 +1,170 @@ |
1 | # $NetBSD: Makefile,v 1.227 2009/05/20 07:46:09 martti Exp $ | | 1 | # $NetBSD: Makefile,v 1.228 2009/06/04 14:08:56 martti Exp $ |
2 | | | 2 | |
3 | DISTNAME= postfix-2.6.1 | | 3 | DISTNAME= postfix-2.6.2 |
4 | #PKGREVISION= 1 | | 4 | #PKGREVISION= 1 |
5 | CATEGORIES= mail | | 5 | CATEGORIES= mail |
6 | MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ | | 6 | MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ |
7 | MASTER_SITES+= http://postfix.it-austria.net/releases/official/ | | 7 | MASTER_SITES+= http://postfix.it-austria.net/releases/official/ |
8 | MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/ | | 8 | MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/ |
9 | MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/ | | 9 | MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/ |
10 | DIST_SUBDIR= postfix | | 10 | DIST_SUBDIR= postfix |
11 | | | 11 | |
12 | MAINTAINER= martti@NetBSD.org | | 12 | MAINTAINER= martti@NetBSD.org |
13 | HOMEPAGE= http://www.postfix.org/ | | 13 | HOMEPAGE= http://www.postfix.org/ |
14 | COMMENT= Postfix SMTP server and tools | | 14 | COMMENT= Postfix SMTP server and tools |
15 | LICENSE= postfix-license | | 15 | LICENSE= postfix-license |
16 | | | 16 | |
17 | CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* | | 17 | CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* |
18 | | | 18 | |
19 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 19 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
20 | | | 20 | |
21 | USE_TOOLS+= perl | | 21 | USE_TOOLS+= perl |
22 | CHECK_HEADERS_SKIP+= src/global/mail_params.h | | 22 | CHECK_HEADERS_SKIP+= src/global/mail_params.h |
23 | | | 23 | |
24 | .include "../../mk/bsd.prefs.mk" | | 24 | .include "../../mk/bsd.prefs.mk" |
25 | | | 25 | |
26 | SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555 | | 26 | SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555 |
27 | SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555 | | 27 | SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555 |
28 | | | 28 | |
29 | # POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is | | 29 | # POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is |
30 | # merely a default, and may be changed by setting "queue_directory" in | | 30 | # merely a default, and may be changed by setting "queue_directory" in |
31 | # ${PKG_SYSCONFDIR}/main.cf. | | 31 | # ${PKG_SYSCONFDIR}/main.cf. |
32 | # | | 32 | # |
33 | POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix | | 33 | POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix |
34 | POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix | | 34 | POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix |
35 | BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR | | 35 | BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR |
36 | | | 36 | |
37 | # CCARGS is a list of options to pass to the preprocessor/compiler. | | 37 | # CCARGS is a list of options to pass to the preprocessor/compiler. |
38 | # AUXLIBS is a list of options to pass to the linker. | | 38 | # AUXLIBS is a list of options to pass to the linker. |
39 | # | | 39 | # |
40 | CCARGS= -DUSE_SASL_AUTH | | 40 | CCARGS= -DUSE_SASL_AUTH |
41 | AUXLIBS= ${LDFLAGS} | | 41 | AUXLIBS= ${LDFLAGS} |
42 | | | 42 | |
43 | # Set some default paths to override ${WRKSRC}/src/global/mail_params.h. | | 43 | # Set some default paths to override ${WRKSRC}/src/global/mail_params.h. |
44 | CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\" | | 44 | CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\" |
45 | CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\" | | 45 | CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\" |
46 | CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\" | | 46 | CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\" |
47 | CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\" | | 47 | CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\" |
48 | CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\" | | 48 | CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\" |
49 | CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\" | | 49 | CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\" |
50 | CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\" | | 50 | CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\" |
51 | CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\" | | 51 | CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\" |
52 | CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\" | | 52 | CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\" |
53 | CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\" | | 53 | CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\" |
54 | CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\" | | 54 | CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\" |
55 | | | 55 | |
56 | REPLACE_PERL+= auxiliary/qshape/qshape.pl | | 56 | REPLACE_PERL+= auxiliary/qshape/qshape.pl |
57 | | | 57 | |
58 | # Override those same default paths in the installed example main.cf. | | 58 | # Override those same default paths in the installed example main.cf. |
59 | SUBST_CLASSES+= postfix | | 59 | SUBST_CLASSES+= postfix |
60 | SUBST_STAGE.postfix= post-configure | | 60 | SUBST_STAGE.postfix= post-configure |
61 | SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h | | 61 | SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h |
62 | SUBST_SED.postfix= \ | | 62 | SUBST_SED.postfix= \ |
63 | -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|' | | 63 | -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|' |
64 | SUBST_SED.postfix+= \ | | 64 | SUBST_SED.postfix+= \ |
65 | -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|' | | 65 | -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|' |
66 | SUBST_SED.postfix+= \ | | 66 | SUBST_SED.postfix+= \ |
67 | -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|' | | 67 | -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|' |
68 | SUBST_SED.postfix+= \ | | 68 | SUBST_SED.postfix+= \ |
69 | -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|' | | 69 | -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|' |
70 | SUBST_SED.postfix+= \ | | 70 | SUBST_SED.postfix+= \ |
71 | -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|' | | 71 | -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|' |
72 | SUBST_SED.postfix+= \ | | 72 | SUBST_SED.postfix+= \ |
73 | -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|' | | 73 | -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|' |
74 | SUBST_SED.postfix+= \ | | 74 | SUBST_SED.postfix+= \ |
75 | -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|' | | 75 | -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|' |
76 | SUBST_SED.postfix+= \ | | 76 | SUBST_SED.postfix+= \ |
77 | -e 's|^\(setgid_group\) =.*|\1 = maildrop|' | | 77 | -e 's|^\(setgid_group\) =.*|\1 = maildrop|' |
78 | SUBST_SED.postfix+= \ | | 78 | SUBST_SED.postfix+= \ |
79 | -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|' | | 79 | -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|' |
80 | SUBST_SED.postfix+= \ | | 80 | SUBST_SED.postfix+= \ |
81 | -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|' | | 81 | -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|' |
82 | SUBST_SED.postfix+= \ | | 82 | SUBST_SED.postfix+= \ |
83 | -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|' | | 83 | -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|' |
84 | SUBST_SED.postfix+= \ | | 84 | SUBST_SED.postfix+= \ |
85 | -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g' | | 85 | -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g' |
86 | | | 86 | |
87 | # options.mk appends to CCARGS and AUXLIBS the options needed to build | | 87 | # options.mk appends to CCARGS and AUXLIBS the options needed to build |
88 | # Postfix with support for various add-on modules. | | 88 | # Postfix with support for various add-on modules. |
89 | # | | 89 | # |
90 | .include "options.mk" | | 90 | .include "options.mk" |
91 | | | 91 | |
92 | PKG_SYSCONFSUBDIR= postfix | | 92 | PKG_SYSCONFSUBDIR= postfix |
93 | LIBEXECDIR= ${PREFIX}/libexec/postfix | | 93 | LIBEXECDIR= ${PREFIX}/libexec/postfix |
94 | DOCDIR= ${PREFIX}/share/doc/postfix | | 94 | DOCDIR= ${PREFIX}/share/doc/postfix |
95 | EXAMPLEDIR= ${PREFIX}/share/examples/postfix | | 95 | EXAMPLEDIR= ${PREFIX}/share/examples/postfix |
96 | | | 96 | |
97 | FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} | | 97 | FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} |
98 | MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} | | 98 | MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR} |
99 | MESSAGE_SUBST+= DOCDIR=${DOCDIR} | | 99 | MESSAGE_SUBST+= DOCDIR=${DOCDIR} |
100 | | | 100 | |
101 | MESSAGE_SRC+= ${PKGDIR}/MESSAGE | | 101 | MESSAGE_SRC+= ${PKGDIR}/MESSAGE |
102 | .if exists(${PKGDIR}/MESSAGE.${OPSYS}) | | 102 | .if exists(${PKGDIR}/MESSAGE.${OPSYS}) |
103 | MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS} | | 103 | MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS} |
104 | .endif | | 104 | .endif |
105 | PLIST_SRC+= ${PKGDIR}/PLIST | | 105 | PLIST_SRC+= ${PKGDIR}/PLIST |
106 | | | 106 | |
107 | BUILD_TARGET= # empty | | 107 | BUILD_TARGET= # empty |
108 | MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q} | | 108 | MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q} |
109 | MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q} | | 109 | MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q} |
110 | | | 110 | |
111 | RCD_SCRIPTS= postfix | | 111 | RCD_SCRIPTS= postfix |
112 | OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc | | 112 | OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc |
113 | OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700 | | 113 | OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700 |
114 | MAKE_DIRS+= ${PKG_SYSCONFDIR} | | 114 | MAKE_DIRS+= ${PKG_SYSCONFDIR} |
115 | | | 115 | |
116 | PKG_GROUPS?= postfix maildrop | | 116 | PKG_GROUPS?= postfix maildrop |
117 | PKG_USERS?= postfix:postfix | | 117 | PKG_USERS?= postfix:postfix |
118 | PKG_GECOS.postfix= Postfix User | | 118 | PKG_GECOS.postfix= Postfix User |
119 | PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR} | | 119 | PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR} |
120 | | | 120 | |
121 | CONF_FILES= # empty | | 121 | CONF_FILES= # empty |
122 | .for i in main.cf master.cf | | 122 | .for i in main.cf master.cf |
123 | CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} | | 123 | CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} |
124 | .endfor | | 124 | .endfor |
125 | CONF_FILES_PERMS= # empty | | 125 | CONF_FILES_PERMS= # empty |
126 | .for i in post-install postfix-script | | 126 | .for i in post-install postfix-script |
127 | CONF_FILES_PERMS+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} \ | | 127 | CONF_FILES_PERMS+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i} \ |
128 | ${ROOT_USER} ${ROOT_GROUP} 755 | | 128 | ${ROOT_USER} ${ROOT_GROUP} 755 |
129 | .endfor | | 129 | .endfor |
130 | | | 130 | |
131 | MAKE_ENV+= DEBUG= # empty | | 131 | MAKE_ENV+= DEBUG= # empty |
132 | | | 132 | |
133 | SUBST_CLASSES+= paths | | 133 | SUBST_CLASSES+= paths |
134 | SUBST_FILES.paths= ${WRKDIR}/mailer.conf | | 134 | SUBST_FILES.paths= ${WRKDIR}/mailer.conf |
135 | SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' | | 135 | SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' |
136 | SUBST_STAGE.paths= post-patch | | 136 | SUBST_STAGE.paths= post-patch |
137 | | | 137 | |
138 | post-extract: | | 138 | post-extract: |
139 | cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf | | 139 | cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf |
140 | rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix | | 140 | rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix |
141 | | | 141 | |
142 | do-configure: | | 142 | do-configure: |
143 | cd ${WRKSRC} && \ | | 143 | cd ${WRKSRC} && \ |
144 | env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \ | | 144 | env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \ |
145 | 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' | | 145 | 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}' |
146 | | | 146 | |
147 | post-build: | | 147 | post-build: |
148 | .if !empty(PKG_OPTIONS:Msasl) | | 148 | .if !empty(PKG_OPTIONS:Msasl) |
149 | ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf | | 149 | ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf |
150 | .endif | | 150 | .endif |
151 | | | 151 | |
152 | do-install: | | 152 | do-install: |
153 | ${INSTALL_DATA_DIR} ${LIBEXECDIR} | | 153 | ${INSTALL_DATA_DIR} ${LIBEXECDIR} |
154 | ${INSTALL_DATA_DIR} ${EXAMPLEDIR} | | 154 | ${INSTALL_DATA_DIR} ${EXAMPLEDIR} |
155 | ${INSTALL_DATA_DIR} ${DOCDIR} | | 155 | ${INSTALL_DATA_DIR} ${DOCDIR} |
156 | rm -f ${WRKSRC}/conf/*.orig | | 156 | rm -f ${WRKSRC}/conf/*.orig |
157 | .if !empty(PKG_OPTIONS:Msasl) | | 157 | .if !empty(PKG_OPTIONS:Msasl) |
158 | ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR} | | 158 | ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR} |
159 | .endif | | 159 | .endif |
160 | ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR} | | 160 | ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR} |
161 | ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR} | | 161 | ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR} |
162 | ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf | | 162 | ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf |
163 | cd ${WRKSRC} && sh ./postfix-install -non-interactive \ | | 163 | cd ${WRKSRC} && sh ./postfix-install -non-interactive \ |
164 | config_directory="${EXAMPLEDIR}" | | 164 | config_directory="${EXAMPLEDIR}" |
165 | ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \ | | 165 | ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \ |
166 | ${PREFIX}/sbin/qshape | | 166 | ${PREFIX}/sbin/qshape |
167 | ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \ | | 167 | ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \ |
168 | ${PREFIX}/${PKGMANDIR}/man1 | | 168 | ${PREFIX}/${PKGMANDIR}/man1 |
169 | | | 169 | |
170 | .include "../../mk/bsd.pkg.mk" | | 170 | .include "../../mk/bsd.pkg.mk" |