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