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

1.170   ! rillig      1: # $NetBSD: Makefile,v 1.169 2005/12/01 06:46:40 martti Exp $
1.1       christos    2: 
1.169     martti      3: DISTNAME=      postfix-2.2.6
                      4: #PKGREVISION=  1
1.1       christos    5: CATEGORIES=    mail
1.63      martti      6: MASTER_SITES=  ftp://ftp.porcupine.org/mirrors/postfix-release/official/
1.132     martti      7: 
1.105     martti      8: MAINTAINER=    [email protected]
1.5       tron        9: HOMEPAGE=      http://www.postfix.org/
1.48      martti     10: COMMENT=       Postfix SMTP server and tools
1.1       christos   11: 
1.158     cjs        12: DIST_SUBDIR=   postfix
                     13: 
1.143     schmonz    14: CONFLICTS+=    sendmail-[0-9]* fastforward>=0.51nb2
1.122     grant      15: 
1.112     jlam       16: PKG_INSTALLATION_TYPES=        overwrite pkgviews
                     17: 
1.140     jlam       18: .include "../../mk/bsd.prefs.mk"
1.69      wiz        19: 
1.140     jlam       20: # POSTFIX_QUEUE_DIR is the default queue directory for Postfix.  This is
                     21: # merely a default, and may be changed by setting "queue_directory" in
                     22: # ${PKG_SYSCONFDIR}/main.cf.
                     23: #
                     24: POSTFIX_QUEUE_DIR?=    ${VARBASE}/spool/postfix
                     25: 
                     26: # CCARGS is a list of options to pass to the preprocessor/compiler.
                     27: # AUXLIBS is a list of options to pass to the linker.
                     28: #
                     29: CCARGS=                # empty
1.166     grant      30: AUXLIBS=       ${LDFLAGS}
1.140     jlam       31: FIX_RPATH+=    AUXLIBS
1.93      jmmv       32: 
1.148     jlam       33: # Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
1.140     jlam       34: CCARGS+=       -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
1.148     jlam       35: CCARGS+=       -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
1.140     jlam       36: CCARGS+=       -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
1.148     jlam       37: CCARGS+=       -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
1.79      lukem      38: CCARGS+=       -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
                     39: CCARGS+=       -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
                     40: CCARGS+=       -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
1.148     jlam       41: CCARGS+=       -DDEF_MANPAGE_DIR=\"${PREFIX}/man\"
                     42: CCARGS+=       -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
                     43: CCARGS+=       -DDEF_README_DIR=\"${DOCDIR}\"
                     44: 
                     45: # Override those same default paths in the installed example main.cf.
                     46: SUBST_CLASSES+=                postfix
                     47: SUBST_STAGE.postfix=   post-configure
                     48: SUBST_FILES.postfix=   conf/main.cf src/global/mail_params.h
                     49: SUBST_SED.postfix=     \
                     50:        -e "s|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|"      \
                     51:        -e "s|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|"          \
                     52:        -e "s|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|"            \
                     53:        -e "s|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|"     \
                     54:        -e "s|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|"  \
                     55:        -e "s|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|"            \
                     56:        -e "s|^\(setgid_group\) =.*|\1 = maildrop|"                     \
                     57:        -e "s|^\(manpage_directory\) =.*|\1 = ${PREFIX}/man|"           \
                     58:        -e "s|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|"            \
                     59:        -e "s|^\(readme_directory\) =.*|\1 = ${DOCDIR}|"                \
                     60:        -e "/^\#define DEF_SGID_GROUP[  ]/s,postdrop,maildrop,g"
1.79      lukem      61: 
1.147     jlam       62: # options.mk appends to CCARGS and AUXLIBS the options needed to build
                     63: # Postfix with support for various add-on modules.
1.140     jlam       64: #
1.147     jlam       65: .include "options.mk"
1.28      hubertf    66: 
1.140     jlam       67: PKG_SYSCONFSUBDIR=     postfix
1.146     jlam       68: LIBEXECDIR=            ${PREFIX}/libexec/postfix
                     69: DOCDIR=                        ${PREFIX}/share/doc/postfix
                     70: EXAMPLEDIR=            ${PREFIX}/share/examples/postfix
1.121     grant      71: 
1.170   ! rillig     72: FILES_SUBST+=          EXAMPLEDIR=${EXAMPLEDIR:Q}
1.140     jlam       73: MESSAGE_SUBST+=                EXAMPLEDIR=${EXAMPLEDIR}
1.142     jlam       74: MESSAGE_SUBST+=                DOCDIR=${DOCDIR}
1.86      jlam       75: 
1.140     jlam       76: MESSAGE_SRC+=          ${PKGDIR}/MESSAGE
                     77: .if exists(${PKGDIR}/MESSAGE.${OPSYS})
                     78: MESSAGE_SRC+=          ${PKGDIR}/MESSAGE.${OPSYS}
1.95      martti     79: .endif
1.140     jlam       80: PLIST_SRC+=            ${PKGDIR}/PLIST
1.50      kent       81: 
1.154     wiz        82: BUILD_TARGET=          # empty
1.170   ! rillig     83: MAKE_ENV+=             CC=${CC:Q} OPT=${CFLAGS:M*:Q}
        !            84: MAKE_ENV+=             AUXLIBS=${AUXLIBS:Q} CCARGS=${CCARGS:Q}
1.140     jlam       85: 
                     86: USE_PKGINSTALL=                yes
                     87: RCD_SCRIPTS=           postfix
                     88: OWN_DIRS+=             ${POSTFIX_QUEUE_DIR}
                     89: MAKE_DIRS+=            ${PKG_SYSCONFDIR}
                     90: 
                     91: PKG_GROUPS?=           postfix maildrop
1.167     rillig     92: PKG_USERS?=            postfix:postfix::Postfix\ User:${POSTFIX_QUEUE_DIR}
1.140     jlam       93: 
1.141     jlam       94: CONF_FILES=            # empty
                     95: .for _file_ in main.cf master.cf postfix-files
                     96: CONF_FILES+=           ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_}
                     97: .endfor
                     98: CONF_FILES_PERMS=      # empty
                     99: .for _file_ in post-install postfix-script
                    100: CONF_FILES_PERMS+=     ${EXAMPLEDIR}/${_file_} ${PKG_SYSCONFDIR}/${_file_} \
                    101:                        ${ROOT_USER} ${ROOT_GROUP} 755
                    102: .endfor
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]>