Annotation of pkgsrc/mail/postfix/Makefile, revision 1.92
1.92 ! martti 1: # $NetBSD: Makefile,v 1.91 2003/04/17 06:22:18 martti Exp $
1.1 christos 2:
1.92 ! martti 3: DISTNAME= postfix-2.0.9
1.1 christos 4: CATEGORIES= mail
1.63 martti 5: MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/
1.1 christos 6:
1.28 hubertf 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.19 kim 11: DIST_SUBDIR= postfix
1.1 christos 12:
1.18 bad 13: POSTFIX_SPOOL= /var/spool/postfix
1.19 kim 14:
1.69 wiz 15: USE_BUILDLINK2= yes
1.78 jlam 16: USE_PKGINSTALL= yes
1.69 wiz 17:
1.79 lukem 18: PKG_SYSCONFSUBDIR= postfix
19:
20: CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
21: CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
22: CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
23: CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
24: CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
25: CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
26:
1.28 hubertf 27: .include "../../mk/bsd.prefs.mk"
28:
1.86 jlam 29: FIX_RPATH+= AUXLIBS
30:
1.73 martti 31: #.if defined(POSTFIX_USE_INET6) && ${POSTFIX_USE_INET6} == "YES"
1.90 taca 32: #PATCHFILES+= tls+ipv6-1.13-pf-2.0.7.patch.gz
1.81 taca 33: #PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.13/
1.73 martti 34: #PATCH_DIST_STRIP= -p1
35: #BUILD_DEFS+= POSTFIX_USE_INET6
36: #
37: #CCARGS+= -DHAS_SSL
38: #AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
1.86 jlam 39: # -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
1.73 martti 40: # -lssl -lcrypto
41: #BUILD_DEFS+= POSTFIX_USE_TLS
42: #
43: #PLIST_SRC+= ${PKGDIR}/PLIST.tls
44: #MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
45: #.endif
1.50 kent 46:
1.48 martti 47: .if defined(POSTFIX_USE_PCRE) && ${POSTFIX_USE_PCRE} == "YES"
1.69 wiz 48: .include "../../devel/pcre/buildlink2.mk"
1.50 kent 49: CCARGS+= -DHAS_PCRE
1.71 martti 50: AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
1.86 jlam 51: -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
1.71 martti 52: -lpcre
1.48 martti 53: BUILD_DEFS+= POSTFIX_USE_PCRE
1.76 martti 54: .else
55: CCARGS+= -DNO_PCRE
1.57 martti 56: .endif
57:
1.71 martti 58: .if defined(POSTFIX_USE_LDAP) && ${POSTFIX_USE_LDAP} == "YES"
59: .include "../../databases/openldap/buildlink2.mk"
60: CCARGS+= -DHAS_LDAP
61: AUXLIBS+= -L${BUILDLINK_PREFIX.openldap}/lib \
1.86 jlam 62: -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib \
1.71 martti 63: -lldap -llber
64: BUILD_DEFS+= POSTFIX_USE_LDAP
65: .endif
66:
1.57 martti 67: .if defined(POSTFIX_USE_MYSQL) && ${POSTFIX_USE_MYSQL} == "YES"
1.69 wiz 68: .include "../../databases/mysql-client/buildlink2.mk"
69: CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
1.71 martti 70: AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
1.86 jlam 71: -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
1.71 martti 72: -lmysqlclient -lz -lm
1.57 martti 73: BUILD_DEFS+= POSTFIX_USE_MYSQL
1.19 kim 74: .endif
75:
1.77 taca 76: #.if defined(POSTFIX_USE_TLS) && ${POSTFIX_USE_TLS} == "YES"
77: #.include "../../security/openssl/buildlink2.mk"
78: #PATCH_SITES+= http://people.arhea.net/dawszy/NetBSD/postfix_tls/
79: #PATCHFILES+= pfixtls-1.1.11.diff.gz
80: #PATCH_DIST_STRIP= -p1
81: #
82: #CCARGS+= -DHAS_SSL
83: #AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
1.86 jlam 84: # -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
1.77 taca 85: # -lssl -lcrypto
86: #BUILD_DEFS+= POSTFIX_USE_TLS
87: #
88: #PLIST_SRC+= ${PKGDIR}/PLIST.tls
89: #MESSAGE_SRC+= ${PKGDIR}/MESSAGE.tls
90: #.endif
1.71 martti 91:
92: .if defined(USE_SASL) && ${USE_SASL} == "YES"
93: .include "../../security/cyrus-sasl/buildlink2.mk"
94: CCARGS+= -DUSE_SASL_AUTH
95: AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
1.86 jlam 96: -Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
1.71 martti 97: -lsasl
98: BUILD_DEFS+= USE_SASL
99:
100: PLIST_SRC+= ${WRKDIR}/PLIST.sasl
101: MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
102: MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
1.67 martti 103: .endif
104:
105: MESSAGE_SRC+= ${PKGDIR}/MESSAGE
1.50 kent 106: PLIST_SRC+= ${PKGDIR}/PLIST
1.28 hubertf 107: ALL_TARGET= #empty
1.65 tron 108: MAKE_ENV= CC="${CC}" OPT="${CFLAGS}"
1.76 martti 109: MAKE_ENV+= AUXLIBS="${AUXLIBS}" CCARGS="${CCARGS}"
1.1 christos 110:
1.79 lukem 111: POSTFIX_CONF_FILES= conf/main.cf src/util/sys_defs.h postfix-install
112: POSTFIX_CONF_FILES+= conf/sample-misc.cf src/global/mail_params.h
113:
114: PLIST_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
115: PLIST_SUBST+= POSTFIX_SPOOL=${POSTFIX_SPOOL}
116:
117: PKG_GROUPS?= postfix maildrop
118: PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_SPOOL}
119:
120: LIBEXECDIR= ${PREFIX}/libexec/${PKGBASE}
121: SHAREDIR= ${PREFIX}/share/${PKGBASE}
122:
123: CONF_FILES+= ${SHAREDIR}/main.cf ${PKG_SYSCONFDIR}/main.cf
124: CONF_FILES+= ${SHAREDIR}/master.cf ${PKG_SYSCONFDIR}/master.cf
125:
1.1 christos 126: pre-configure:
1.79 lukem 127: @for i in ${POSTFIX_CONF_FILES}; do \
128: ${CP} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.dist; \
129: ${SED} -e 's|__PREFIX|'${PREFIX}'|g' \
130: -e 's|__PKG_SYSCONFDIR|'${PKG_SYSCONFDIR}'|g' \
131: < ${WRKSRC}/$${i}.dist \
132: > ${WRKSRC}/$${i}; \
133: done
1.28 hubertf 134:
135: do-configure:
1.76 martti 136: (cd ${WRKSRC} && \
137: ${SETENV} ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
138: 'CCARGS=${CCARGS}' 'AUXLIBS=${AUXLIBS}')
1.1 christos 139:
1.5 tron 140: post-build:
141: ${SED} -e 's#@@PREFIX@@#${PREFIX}#g' \
1.28 hubertf 142: <${FILESDIR}/mailer.conf >${WRKDIR}/mailer.conf.postfix
1.5 tron 143:
1.1 christos 144: pre-install:
1.79 lukem 145: ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
146: ${INSTALL_DATA_DIR} ${SHAREDIR}
1.62 martti 147: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postfix
1.79 lukem 148: ${INSTALL_DATA_DIR} ${LIBEXECDIR}
149: ${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${SHAREDIR} ${LIBEXECDIR}
150: ${CHMOD} 755 ${SHAREDIR} ${LIBEXECDIR}
1.28 hubertf 151: -${RM} -f ${WRKSRC}/conf/*.orig
1.53 jlam 152: .if defined(USE_SASL) && ${USE_SASL} == "YES"
1.62 martti 153: ${ECHO} "pwcheck_method: sasldb" > ${WRKDIR}/smtpd.conf
1.50 kent 154: ${INSTALL_DATA} ${WRKDIR}/smtpd.conf ${PREFIX}/lib/sasl
1.62 martti 155: ${ECHO} lib/sasl/smtpd.conf > ${WRKDIR}/PLIST.sasl
1.50 kent 156: .endif
1.79 lukem 157: for pf in postfix-files postfix-script main.cf master.cf; do \
158: ${TEST} -f ${PKG_SYSCONFDIR}/$$pf || \
159: ${INSTALL_DATA} ${WRKSRC}/conf/$$pf ${PKG_SYSCONFDIR}; \
160: done
1.54 martti 161:
162: do-install:
163: (cd ${WRKSRC} && ${SH} postfix-install -non-interactive)
1.5 tron 164:
165: post-install:
1.79 lukem 166: ${INSTALL_DATA} ${WRKSRC}/conf/main.cf ${SHAREDIR}
167: ${INSTALL_DATA} ${WRKSRC}/conf/master.cf ${SHAREDIR}
168: ${INSTALL_SCRIPT} ${WRKSRC}/conf/post-install ${SHAREDIR}
169: ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-files ${SHAREDIR}
170: ${INSTALL_SCRIPT} ${WRKSRC}/conf/postfix-script ${SHAREDIR}
1.5 tron 171: ${INSTALL_DATA} ${WRKDIR}/mailer.conf.postfix ${PREFIX}/etc
1.79 lukem 172: ${LN} -sf ${SHAREDIR}/post-install ${PKG_SYSCONFDIR}
173: ${LN} -sf ${SHAREDIR}/postfix-files ${PKG_SYSCONFDIR}
174: ${LN} -sf ${SHAREDIR}/postfix-script ${PKG_SYSCONFDIR}
1.34 wiz 175: ${INSTALL_DATA_DIR} ${POSTFIX_SPOOL}
1.22 wiz 176: ${CHMOD} 755 ${POSTFIX_SPOOL}
1.1 christos 177:
178: .include "../../mk/bsd.pkg.mk"
CVSweb <[email protected]>