Annotation of pkgsrc/mail/postfix/Makefile, revision 1.80

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

CVSweb <[email protected]>