diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index 4a7d3ed31481..32b5e89cf1b3 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -11,28 +11,40 @@ BINDIR= /usr/libexec/sendmail PROG= sendmail MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 -SRCS= alias.c arpadate.c bf_torek.c clock.c collect.c conf.c control.c \ +SRCS= 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 main.c map.c mci.c milter.c mime.c parseaddr.c queue.c \ - readcf.c recipient.c savemail.c sfsasl.c shmticklib.c srvrsmtp.c \ - stab.c stats.c sysexits.c timers.c trace.c udb.c usersmtp.c util.c \ - version.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 BINOWN= root +BINGRP= smmsp +.ifdef SENDMAIL_SET_USER_ID BINMODE=4555 +.else +BINMODE=2555 +.endif # Define the database format to use for aliases et al. DBMDEF= -DNEWDB # If you don't want NIS alias/map support, comment out this line NIS= -DNIS # Map extensions -MAPS= -DMAP_REGEX +MAPS= -DMAP_REGEX -DDNSMAP -CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -CFLAGS+= ${DBMDEF} ${NIS} -DNETINET6 -DTCPWRAPPERS ${MAPS} +CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I. +CFLAGS+= ${DBMDEF} ${NIS} -DMILTER -DNETINET6 -DTCPWRAPPERS ${MAPS} DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap +.if exists(${.OBJDIR}/../../lib/libsm) +LIBSMDIR:= ${.OBJDIR}/../../lib/libsm +.else +LIBSMDIR!= cd ${.CURDIR}/../../lib/libsm; make -V .OBJDIR +.endif +LIBSM:= ${LIBSMDIR}/libsm.a + .if exists(${.OBJDIR}/../../lib/libsmutil) LIBSMUTILDIR:= ${.OBJDIR}/../../lib/libsmutil .else @@ -40,15 +52,18 @@ LIBSMUTILDIR!= cd ${.CURDIR}/../../lib/libsmutil; make -V .OBJDIR .endif LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a -DPADD+= ${LIBSMUTIL} -LDADD+= ${LIBSMUTIL} +DPADD+= ${LIBSMUTIL} ${LIBSM} +LDADD+= ${LIBSMUTIL} ${LIBSM} + +SRCS+= sm_os.h +CLEANFILES+=sm_os.h .if exists(${.CURDIR}/../../secure) && !defined(NOCRYPT) && \ !defined(NOSECURE) && !defined(NO_OPENSSL) && \ !defined(RELEASE_CRUNCH) # STARTTLS support DISTRIBUTION= crypto -CFLAGS+= -DSTARTTLS -D_FFR_TLS_O_T -D_FFR_TLS_1 -D_FFR_TLS_TOREK +CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 LDADD+= -lssl -lcrypto DPADD+= ${LIBSSL} ${LIBCRYPTO} .endif @@ -59,12 +74,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -afterinstall: - @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/sendmail.cf -a \ - ! -f ${DESTDIR}/etc/mail/sendmail.cf ]; then \ - set -x; \ - mv -f ${DESTDIR}/etc/sendmail.cf \ - ${DESTDIR}/etc/mail/sendmail.cf; \ - fi +sm_os.h: + ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h .include