Annotation of pkgsrc/mail/postfix/Makefile, revision 1.237
1.237 ! tron 1: # $NetBSD: Makefile,v 1.236 2010/11/28 18:14:10 tron Exp $
1.1 christos 2:
1.237 ! tron 3: DISTNAME= postfix-2.8.1
1.1 christos 4: CATEGORIES= mail
1.63 martti 5: MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
1.219 ghen 6: MASTER_SITES+= http://postfix.it-austria.net/releases/official/
7: MASTER_SITES+= http://mirrors.isc.org/pub/postfix/official/
8: MASTER_SITES+= http://mirror.postfix.jp/postfix-release/official/
1.132 martti 9:
1.235 wiz 10: MAINTAINER= [email protected]
1.5 tron 11: HOMEPAGE= http://www.postfix.org/
1.48 martti 12: COMMENT= Postfix SMTP server and tools
1.234 gdt 13: # The postfix license has only very minor diffs from cpl-1.0.
14: LICENSE= cpl-1.0
15: #LICENSE= postfix-license
1.1 christos 16:
1.181 jlam 17: CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
1.232 obache 18: CONFLICTS+= esmtp>=1.2
1.122 grant 19:
1.229 heinz 20: PKG_DESTDIR_SUPPORT= user-destdir
1.112 jlam 21: PKG_INSTALLATION_TYPES= overwrite pkgviews
22:
1.178 martti 23: USE_TOOLS+= perl
1.196 rillig 24: CHECK_HEADERS_SKIP+= src/global/mail_params.h
1.178 martti 25:
1.140 jlam 26: .include "../../mk/bsd.prefs.mk"
1.69 wiz 27:
1.227 martti 28: SPECIAL_PERMS+= sbin/postdrop postfix maildrop 2555
29: SPECIAL_PERMS+= sbin/postqueue postfix maildrop 2555
30:
1.140 jlam 31: # POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is
32: # merely a default, and may be changed by setting "queue_directory" in
33: # ${PKG_SYSCONFDIR}/main.cf.
34: #
1.216 taca 35: POSTFIX_DATA_DIR?= ${VARBASE}/db/postfix
1.140 jlam 36: POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix
1.216 taca 37: BUILD_DEFS+= VARBASE POSTFIX_DATA_DIR POSTFIX_QUEUE_DIR
1.140 jlam 38:
39: # CCARGS is a list of options to pass to the preprocessor/compiler.
40: # AUXLIBS is a list of options to pass to the linker.
41: #
1.212 ghen 42: CCARGS= -DUSE_SASL_AUTH
1.166 grant 43: AUXLIBS= ${LDFLAGS}
1.93 jmmv 44:
1.148 jlam 45: # Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
1.216 taca 46: CCARGS+= -DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\"
1.140 jlam 47: CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
1.148 jlam 48: CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
1.140 jlam 49: CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
1.148 jlam 50: CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
1.79 lukem 51: CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
52: CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
53: CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
1.207 jlam 54: CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/${PKGMANDIR}\"
1.148 jlam 55: CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
56: CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
57:
1.177 martti 58: REPLACE_PERL+= auxiliary/qshape/qshape.pl
59:
1.148 jlam 60: # Override those same default paths in the installed example main.cf.
61: SUBST_CLASSES+= postfix
62: SUBST_STAGE.postfix= post-configure
63: SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h
64: SUBST_SED.postfix= \
1.216 taca 65: -e 's|^\(data_directory\) =.*|\1 = ${POSTFIX_DATA_DIR}|'
66: SUBST_SED.postfix+= \
1.194 martti 67: -e 's|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|'
1.191 martti 68: SUBST_SED.postfix+= \
1.194 martti 69: -e 's|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|'
1.191 martti 70: SUBST_SED.postfix+= \
1.194 martti 71: -e 's|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|'
1.191 martti 72: SUBST_SED.postfix+= \
1.194 martti 73: -e 's|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|'
1.191 martti 74: SUBST_SED.postfix+= \
1.194 martti 75: -e 's|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|'
1.191 martti 76: SUBST_SED.postfix+= \
1.194 martti 77: -e 's|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|'
1.191 martti 78: SUBST_SED.postfix+= \
1.194 martti 79: -e 's|^\(setgid_group\) =.*|\1 = maildrop|'
1.191 martti 80: SUBST_SED.postfix+= \
1.207 jlam 81: -e 's|^\(manpage_directory\) =.*|\1 = ${PREFIX}/${PKGMANDIR}|'
1.191 martti 82: SUBST_SED.postfix+= \
1.194 martti 83: -e 's|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|'
1.191 martti 84: SUBST_SED.postfix+= \
1.194 martti 85: -e 's|^\(readme_directory\) =.*|\1 = ${DOCDIR}|'
1.191 martti 86: SUBST_SED.postfix+= \
1.194 martti 87: -e '/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g'
1.79 lukem 88:
1.147 jlam 89: # options.mk appends to CCARGS and AUXLIBS the options needed to build
90: # Postfix with support for various add-on modules.
1.140 jlam 91: #
1.147 jlam 92: .include "options.mk"
1.28 hubertf 93:
1.140 jlam 94: PKG_SYSCONFSUBDIR= postfix
1.146 jlam 95: LIBEXECDIR= ${PREFIX}/libexec/postfix
96: DOCDIR= ${PREFIX}/share/doc/postfix
97: EXAMPLEDIR= ${PREFIX}/share/examples/postfix
1.121 grant 98:
1.217 martti 99: FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
1.140 jlam 100: MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
1.142 jlam 101: MESSAGE_SUBST+= DOCDIR=${DOCDIR}
1.86 jlam 102:
1.140 jlam 103: MESSAGE_SRC+= ${PKGDIR}/MESSAGE
104: .if exists(${PKGDIR}/MESSAGE.${OPSYS})
105: MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
1.95 martti 106: .endif
1.140 jlam 107: PLIST_SRC+= ${PKGDIR}/PLIST
1.50 kent 108:
1.154 wiz 109: BUILD_TARGET= # empty
1.188 martti 110: MAKE_ENV+= CC=${CC:Q} OPT=${CFLAGS:Q}
1.170 rillig 111: MAKE_ENV+= AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q}
1.140 jlam 112:
113: RCD_SCRIPTS= postfix
1.173 martti 114: OWN_DIRS+= ${POSTFIX_QUEUE_DIR} ${POSTFIX_QUEUE_DIR}/etc
1.216 taca 115: OWN_DIRS_PERMS+= ${POSTFIX_DATA_DIR} postfix postfix 0700
1.140 jlam 116: MAKE_DIRS+= ${PKG_SYSCONFDIR}
117:
118: PKG_GROUPS?= postfix maildrop
1.180 jlam 119: PKG_USERS?= postfix:postfix
120: PKG_GECOS.postfix= Postfix User
121: PKG_HOME.postfix= ${POSTFIX_QUEUE_DIR}
1.140 jlam 122:
1.141 jlam 123: CONF_FILES= # empty
1.224 martti 124: .for i in main.cf master.cf
1.192 martti 125: CONF_FILES+= ${EXAMPLEDIR}/${i} ${PKG_SYSCONFDIR}/${i}
1.141 jlam 126: .endfor
127: CONF_FILES_PERMS= # empty
1.93 jmmv 128:
1.151 xtraeme 129: MAKE_ENV+= DEBUG= # empty
130:
1.176 joerg 131: SUBST_CLASSES+= paths
132: SUBST_FILES.paths= ${WRKDIR}/mailer.conf
133: SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
134: SUBST_STAGE.paths= post-patch
135:
1.229 heinz 136: .if !empty(USE_DESTDIR:M[Yy][Ee][Ss])
137: DESTDIR_INSTALLOPTIONS=-package install_root="${DESTDIR}"
138: .endif
139:
140: INSTALLATION_DIRS+= ${LIBEXECDIR} ${EXAMPLEDIR} ${DOCDIR}
141:
1.176 joerg 142: post-extract:
1.190 martti 143: cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
1.193 martti 144: rm -f ${WRKSRC}/auxiliary/MacOSX/Postfix.StartupItem/Postfix
1.176 joerg 145:
1.28 hubertf 146: do-configure:
1.108 jlam 147: cd ${WRKSRC} && \
1.190 martti 148: env ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
1.108 jlam 149: 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}'
1.1 christos 150:
1.5 tron 151: post-build:
1.145 jlam 152: .if !empty(PKG_OPTIONS:Msasl)
1.140 jlam 153: ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
154: .endif
1.5 tron 155:
1.140 jlam 156: do-install:
1.190 martti 157: rm -f ${WRKSRC}/conf/*.orig
1.145 jlam 158: .if !empty(PKG_OPTIONS:Msasl)
1.229 heinz 159: ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${DESTDIR}${EXAMPLEDIR}
1.50 kent 160: .endif
1.200 martti 161: cd ${WRKSRC} && sh ./postfix-install -non-interactive \
1.229 heinz 162: ${DESTDIR_INSTALLOPTIONS} config_directory="${EXAMPLEDIR}"
163: ${INSTALL_DATA} ${WRKDIR}/mailer.conf \
164: ${DESTDIR}${EXAMPLEDIR}/mailer.conf
1.177 martti 165: ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl \
1.229 heinz 166: ${DESTDIR}${PREFIX}/sbin/qshape
1.204 martti 167: ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \
1.229 heinz 168: ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
1.1 christos 169:
170: .include "../../mk/bsd.pkg.mk"
CVSweb <[email protected]>