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