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