Annotation of pkgsrc/mail/postfix/Makefile, revision 1.165
1.165 ! martti 1: # $NetBSD: Makefile,v 1.164 2005/06/23 07:58:48 martti Exp $
1.1 christos 2:
1.165 ! martti 3: DISTNAME= postfix-2.2.5
1.1 christos 4: CATEGORIES= mail
1.63 martti 5: MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
1.132 martti 6:
1.105 martti 7: MAINTAINER= [email protected]
1.5 tron 8: HOMEPAGE= http://www.postfix.org/
1.48 martti 9: COMMENT= Postfix SMTP server and tools
1.1 christos 10:
1.158 cjs 11: DIST_SUBDIR= postfix
12:
1.143 schmonz 13: CONFLICTS+= sendmail-[0-9]* fastforward>=0.51nb2
1.122 grant 14:
1.112 jlam 15: PKG_INSTALLATION_TYPES= overwrite pkgviews
16:
1.140 jlam 17: .include "../../mk/bsd.prefs.mk"
1.69 wiz 18:
1.140 jlam 19: # POSTFIX_QUEUE_DIR is the default queue directory for Postfix. This is
20: # merely a default, and may be changed by setting "queue_directory" in
21: # ${PKG_SYSCONFDIR}/main.cf.
22: #
23: POSTFIX_QUEUE_DIR?= ${VARBASE}/spool/postfix
24:
25: # CCARGS is a list of options to pass to the preprocessor/compiler.
26: # AUXLIBS is a list of options to pass to the linker.
27: #
28: CCARGS= # empty
29: AUXLIBS= # empty
30: FIX_RPATH+= AUXLIBS
1.93 jmmv 31:
1.148 jlam 32: # Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
1.140 jlam 33: CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
1.148 jlam 34: CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
1.140 jlam 35: CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
1.148 jlam 36: CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
1.79 lukem 37: CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
38: CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
39: CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
1.148 jlam 40: CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/man\"
41: CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
42: CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
43:
44: # Override those same default paths in the installed example main.cf.
45: SUBST_CLASSES+= postfix
46: SUBST_STAGE.postfix= post-configure
47: SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h
48: SUBST_SED.postfix= \
49: -e "s|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|" \
50: -e "s|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|" \
51: -e "s|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|" \
52: -e "s|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|" \
53: -e "s|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|" \
54: -e "s|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|" \
55: -e "s|^\(setgid_group\) =.*|\1 = maildrop|" \
56: -e "s|^\(manpage_directory\) =.*|\1 = ${PREFIX}/man|" \
57: -e "s|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|" \
58: -e "s|^\(readme_directory\) =.*|\1 = ${DOCDIR}|" \
59: -e "/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g"
1.79 lukem 60:
1.147 jlam 61: # options.mk appends to CCARGS and AUXLIBS the options needed to build
62: # Postfix with support for various add-on modules.
1.140 jlam 63: #
1.147 jlam 64: .include "options.mk"
1.28 hubertf 65:
1.140 jlam 66: PKG_SYSCONFSUBDIR= postfix
1.146 jlam 67: LIBEXECDIR= ${PREFIX}/libexec/postfix
68: DOCDIR= ${PREFIX}/share/doc/postfix
69: EXAMPLEDIR= ${PREFIX}/share/examples/postfix
1.121 grant 70:
1.140 jlam 71: FILES_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
72: MESSAGE_SUBST+= EXAMPLEDIR=${EXAMPLEDIR}
1.142 jlam 73: MESSAGE_SUBST+= DOCDIR=${DOCDIR}
1.86 jlam 74:
1.140 jlam 75: MESSAGE_SRC+= ${PKGDIR}/MESSAGE
76: .if exists(${PKGDIR}/MESSAGE.${OPSYS})
77: MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
1.95 martti 78: .endif
1.140 jlam 79: PLIST_SRC+= ${PKGDIR}/PLIST
1.50 kent 80:
1.154 wiz 81: BUILD_TARGET= # empty
1.140 jlam 82: MAKE_ENV= CC="${CC}" OPT="${CFLAGS}"
83: MAKE_ENV+= AUXLIBS="${AUXLIBS}" CCARGS="${CCARGS}"
84:
85: USE_PKGINSTALL= yes
86: RCD_SCRIPTS= postfix
87: OWN_DIRS+= ${POSTFIX_QUEUE_DIR}
88: MAKE_DIRS+= ${PKG_SYSCONFDIR}
89:
90: PKG_GROUPS?= postfix maildrop
91: PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_QUEUE_DIR}
92:
1.141 jlam 93: CONF_FILES= # empty
94: .for _file_ in main.cf master.cf postfix-files
95: CONF_FILES+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_}
96: .endfor
97: CONF_FILES_PERMS= # empty
98: .for _file_ in post-install postfix-script
99: CONF_FILES_PERMS+= ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
100: ${ROOT_USER} ${ROOT_GROUP} 755
101: .endfor
102: .undef _file_
1.145 jlam 103: .if !empty(PKG_OPTIONS:Msasl)
1.140 jlam 104: MAKE_DIRS+= ${SASLLIBDIR}
105: CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
1.107 jlam 106: .endif
1.93 jmmv 107:
1.151 xtraeme 108: MAKE_ENV+= DEBUG= # empty
109:
1.28 hubertf 110: do-configure:
1.108 jlam 111: cd ${WRKSRC} && \
112: ${SETENV} ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
113: 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}'
1.1 christos 114:
1.5 tron 115: post-build:
1.134 jlam 116: @${SED} ${FILES_SUBST_SED} ${FILESDIR}/mailer.conf \
1.140 jlam 117: > ${WRKDIR}/mailer.conf
1.145 jlam 118: .if !empty(PKG_OPTIONS:Msasl)
1.140 jlam 119: ${ECHO} "pwcheck_method: ${PWCHECK_METHOD}" > ${WRKDIR}/smtpd.conf
120: .endif
1.5 tron 121:
1.140 jlam 122: do-install:
123: ${INSTALL_DATA_DIR} ${LIBEXECDIR}
1.136 jlam 124: ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
1.139 jlam 125: ${INSTALL_DATA_DIR} ${DOCDIR}
1.28 hubertf 126: -${RM} -f ${WRKSRC}/conf/*.orig
1.145 jlam 127: .if !empty(PKG_OPTIONS:Msasl)
1.136 jlam 128: ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${EXAMPLEDIR}
1.50 kent 129: .endif
1.136 jlam 130: ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${EXAMPLEDIR}
131: ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${EXAMPLEDIR}
1.140 jlam 132: ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EXAMPLEDIR}/mailer.conf
1.141 jlam 133: cd ${WRKSRC}; ${SH} ./postfix-install -non-interactive \
134: config_directory="${EXAMPLEDIR}"
1.1 christos 135:
136: .include "../../mk/bsd.pkg.mk"
CVSweb <[email protected]>