[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mail / postfix

Annotation of pkgsrc/mail/postfix/Makefile, Revision 1.207.2.1

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

CVSweb <webmaster@jp.NetBSD.org>