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