# $NetBSD: Makefile,v 1.73 2004/08/30 20:16:28 adrianp Exp $ .include "../../mail/sendmail/Makefile.common" PKGNAME= sendmail-${DIST_VERS} COMMENT= The well known Mail Transport Agent CONFLICTS+= postfix-[0-9]* fastforward>=0.51nb2 MESSAGE_SRC= ${WRKDIR}/.MESSAGE_SRC PLIST_SRC= ${WRKDIR}/.PLIST_SRC SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin PLIST_SUBST+= SMRSH_CMDDIR=${SMRSH_CMDDIR} SUBST_CLASSES= paths SUBST_STAGE.paths= pre-build SUBST_FILES.paths= ${WRKDIR}/mailer.conf include/sm/conf.h smrsh/smrsh.8 SUBST_SED.paths= -e "s|@@PREFIX@@|${PREFIX}|g" \ -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g" SUBST_MESSAGE.paths= Fixing paths. post-patch: make-sendmail-siteconfig .if !empty(PKG_OPTIONS:Mtcpwrappers) @${CAT} ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mldap) @${CAT} ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mdb2) @${CAT} ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mdb4) @${CAT} ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Mstarttls) @${CAT} ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Msasl) @${CAT} ${FILESDIR}/site.config.m4-sasl >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Msasl2) @${CAT} ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG} .endif .if !empty(PKG_OPTIONS:Msocketmap) @${CAT} ${FILESDIR}/site.config.m4-socketmap >>${SITECONFIG} PLIST_SRC+= ${PKGDIR}/PLIST.socketmap .endif post-extract: @${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf do-build: @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./Build) post-build: @${CP} ${PKGDIR}/MESSAGE ${MESSAGE_SRC} @${CP} ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC .if !empty(PKG_OPTIONS:Mdb2) @${ECHO} "" >>${MESSAGE_SRC} @${ECHO} "If you are upgrading from \"sendmail\" 8.8.x don't forget to rebuild all" >>${MESSAGE_SRC} @${ECHO} "databases with \"${PREFIX}/bin/newaliases\" and \"${PREFIX}/sbin/makemap\"." >>${MESSAGE_SRC} .endif pre-install: ${INSTALL_DATA_DIR} ${PREFIX}/libexec/sendmail post-install: ${INSTALL_DATA_DIR} ${SMRSH_CMDDIR} ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sendmail ${INSTALL_DATA_DIR} ${PREFIX}/share/sendmail ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ ${PREFIX}/share/examples/sendmail/ cd ${WRKSRC}/cf && ${PAX} -rw -pp -pm . ${PREFIX}/share/sendmail ${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/share/sendmail .if !empty(PKG_OPTIONS:Mdb2) @${MV} -f /usr/sbin/makemap /usr/sbin/makemap.8.8 || ${TRUE} .endif ${INSTALL_DATA} ${WRKSRC}/obj.`${UNAME} -srm | ${TR} \ . | ${TR} \/ - | ${SED} s/sun4./sun4/`/libsm/libsm.a \ ${PREFIX}/lib ${INSTALL_DATA} \ ${WRKSRC}/obj.`${UNAME} -srm | ${TR} \ . | ${TR} \/ - | ${SED} s/sun4./sun4/`/libsmutil/libsmutil.a \ ${PREFIX}/lib .if !empty(PKG_OPTIONS:Msocketmap) ${INSTALL_SCRIPT} ${WRKSRC}/contrib/socketmapClient.pl \ ${PREFIX}/share/examples/sendmail ${INSTALL_SCRIPT} ${WRKSRC}/contrib/socketmapServer.pl \ ${PREFIX}/share/examples/sendmail .endif ${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/cf/README ${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/sendmail/SECURITY ${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/doc/op/op.me ${PREFIX}/share/doc/sendmail ${INSTALL_DATA} ${WRKSRC}/doc/op/op.ps ${PREFIX}/share/doc/sendmail USE_PKGINSTALL= yes PKG_GROUPS= smmsp PKG_USERS= smmsp:smmsp::Sendmail\\ Message\\ Submission\\ Program .include "../../mk/bsd.pkg.mk" # has to be below include for bsd.pkg.mk, else substition fails OBJDIR!= ${ECHO} obj.`${UNAME} -srm | ${TR} \ . | ${TR} \/ -`