1include(confBUILDTOOLSDIR`/M4/switch.m4') 2 3define(`confREQUIRE_LIBSM', `true') 4bldPRODUCT_START(`executable', `sendmail') 5define(`bldBIN_TYPE', `G') 6define(`bldINSTALL_DIR', `') 7define(`bldSOURCES', `main.c alias.c arpadate.c bf.c collect.c conf.c control.c convtime.c daemon.c deliver.c domain.c envelope.c err.c headers.c macro.c map.c mci.c milter.c mime.c parseaddr.c queue.c readcf.c recipient.c savemail.c sasl.c sfsasl.c shmticklib.c sm_resolve.c srvrsmtp.c stab.c stats.c sysexits.c timers.c tls.c trace.c udb.c usersmtp.c util.c version.c ') 8PREPENDDEF(`confENVDEF', `confMAPDEF') 9bldPUSH_SMLIB(`sm') 10bldPUSH_SMLIB(`smutil') 11 12dnl hack: /etc/mail is not defined as "location of .cf" in the build system 13define(`bldTARGET_INST_DEP', ifdef(`confINST_DEP', `confINST_DEP', 14`${DESTDIR}/etc/mail/submit.cf ${DESTDIR}${MSPQ}'))dnl 15define(`bldTARGET_LINKS', ifdef(`confLINKS', `confLINKS', 16`${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat') 17)dnl 18 19# location of sendmail statistics file (usually /etc/mail/ or /var/log) 20STDIR= ifdef(`confSTDIR', `confSTDIR', `/etc/mail') 21 22# full path to installed statistics file (usually ${STDIR}/statistics) 23STFILE= ${STDIR}/ifdef(`confSTFILE', `confSTFILE', `statistics') 24 25# location of sendmail helpfile file (usually /etc/mail) 26HFDIR= ifdef(`confHFDIR', `confHFDIR', `/etc/mail') 27 28# full path to installed help file (usually ${HFDIR}/helpfile) 29HFFILE= ${HFDIR}/ifdef(`confHFFILE', `confHFFILE', `helpfile') 30 31ifdef(`confSMSRCADD', `APPENDDEF(`confSRCADD', `confSMSRCADD')') 32ifdef(`confSMOBJADD', `APPENDDEF(`confOBJADD', `confSMOBJADD')') 33 34bldPUSH_TARGET(`statistics') 35divert(bldTARGETS_SECTION) 36statistics: 37 ${CP} /dev/null statistics 38 39${DESTDIR}/etc/mail/submit.cf: 40 @echo "Please read INSTALL if anything fails while installing the binary." 41 @echo "${DESTDIR}/etc/mail/submit.cf will be installed now." 42 cd ${SRCDIR}/cf/cf && make install-submit-cf 43 44MSPQ=ifdef(`confMSP_QUEUE_DIR', `confMSP_QUEUE_DIR', `/var/spool/clientmqueue') 45 46${DESTDIR}${MSPQ}: 47 @echo "Please read INSTALL if anything fails while installing the binary." 48 @echo "You must have setup a new user ${MSPQOWN} and a new group ${GBINGRP}" 49 @echo "as explained in sendmail/SECURITY." 50 mkdir -p ${DESTDIR}${MSPQ} 51 chown ${MSPQOWN} ${DESTDIR}${MSPQ} 52 chgrp ${GBINGRP} ${DESTDIR}${MSPQ} 53 chmod 0770 ${DESTDIR}${MSPQ} 54 55divert(0) 56 57ifdef(`confSETUSERID_INSTALL', `bldPUSH_INSTALL_TARGET(`install-set-user-id')') 58ifdef(`confMTA_INSTALL', `bldPUSH_INSTALL_TARGET(`install-sm-mta')') 59ifdef(`confNO_HELPFILE_INSTALL',, `bldPUSH_INSTALL_TARGET(`install-hf')') 60ifdef(`confNO_STATISTICS_INSTALL',, `bldPUSH_INSTALL_TARGET(`install-st')') 61divert(bldTARGETS_SECTION) 62 63install-set-user-id: bldCURRENT_PRODUCT ifdef(`confNO_HELPFILE_INSTALL',, `install-hf') ifdef(`confNO_STATISTICS_INSTALL',, `install-st') ifdef(`confNO_MAN_BUILD',, `install-docs') 64 ${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR} 65 for i in ${sendmailTARGET_LINKS}; do \ 66 rm -f $$i; \ 67 ln -s ${M`'BINDIR}/sendmail $$i; \ 68 done 69 70define(`confMTA_LINKS', `${DESTDIR}${UBINDIR}/newaliases ${DESTDIR}${UBINDIR}/mailq ${DESTDIR}${UBINDIR}/hoststat ${DESTDIR}${UBINDIR}/purgestat') 71install-sm-mta: bldCURRENT_PRODUCT 72 ${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta 73 for i in confMTA_LINKS; do \ 74 rm -f $$i; \ 75 ln -s ${M`'BINDIR}/sm-mta $$i; \ 76 done 77 78install-hf: 79 if [ ! -d ${DESTDIR}${HFDIR} ]; then mkdir -p ${DESTDIR}${HFDIR}; else :; fi 80 ${INSTALL} -c -o ${UBINOWN} -g ${UBINGRP} -m 444 helpfile ${DESTDIR}${HFFILE} 81 82install-st: statistics 83 if [ ! -d ${DESTDIR}${STDIR} ]; then mkdir -p ${DESTDIR}${STDIR}; else :; fi 84 ${INSTALL} -c -o ${SBINOWN} -g ${UBINGRP} -m 644 statistics ${DESTDIR}${STFILE} 85divert(0) 86bldPRODUCT_END 87 88bldPRODUCT_START(`manpage', `sendmail') 89define(`bldSOURCES', `sendmail.8 aliases.5 mailq.1 newaliases.1') 90bldPRODUCT_END 91 92bldFINISH 93