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

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

CVSweb <[email protected]>