From 850dab17735a22f6d201725d9afdf91f8fb08aae Mon Sep 17 00:00:00 2001 From: Gregory Neil Shapiro Date: Sun, 17 Feb 2002 22:01:40 +0000 Subject: [PATCH] Add two new libraries which are part of sendmail 8.12. libsm is used only for building sendmail and the associated utilities. libmilter is a new mail filtering API for sendmail. --- lib/Makefile | 6 ++++-- lib/libmilter/Makefile | 28 ++++++++++++++++++++++++++++ lib/libsm/Makefile | 37 +++++++++++++++++++++++++++++++++++++ share/mk/bsd.libnames.mk | 3 +++ 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 lib/libmilter/Makefile create mode 100644 lib/libsm/Makefile diff --git a/lib/Makefile b/lib/Makefile index 1d009f5ae922..8f2fe03a1048 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,9 +25,9 @@ SUBDIR= ${_csu} libcom_err libcrypt libkvm msun libmd \ ${_compat} libalias libatm ${_libbind} libbz2 libc ${_libc_r} \ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ libedit libfetch libform libftpio ${_libgnumalloc} ${_libio} libipsec \ - libipx libisc libmenu ${_libmp} ${_libncp} \ + libipx libisc libmenu ${_libmilter} ${_libmp} ${_libncp} \ libnetgraph libopie libpam libpanel libpcap \ - ${_libresolv} ${_libsmb} ${_libsmdb} ${_libsmutil} \ + ${_libresolv} ${_libsm} ${_libsmb} ${_libsmdb} ${_libsmutil} \ libstand ${_libtelnet} libusb ${_libvgl} libwrap libxpg4 liby libz .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-${OBJFORMAT}) @@ -52,6 +52,8 @@ _libbind= libbind .endif .if !defined(NO_SENDMAIL) +_libmilter= libmilter +_libsm= libsm _libsmdb= libsmdb _libsmutil= libsmutil .endif diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile new file mode 100644 index 000000000000..b3444e59f6dc --- /dev/null +++ b/lib/libmilter/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +MAINTAINER= gshapiro@FreeBSD.org + +SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +.PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm + +CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. +CFLAGS+=-DNETINET6 -DNOT_SENDMAIL -Dsm_snprintf=snprintf +CFLAGS+=-D_THREAD_SAFE + +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} + +INCDIR= /usr/include/libmilter +INCS= ${SENDMAIL_DIR}/include/libmilter/mfapi.h \ + ${SENDMAIL_DIR}/include/libmilter/mfdef.h +LIB= milter + +SRCS+= sm_os.h +SRCS+= main.c engine.c listener.c handler.c comm.c smfi.c \ + signal.c sm_gethost.c errstring.c strl.c +CLEANFILES+=sm_os.h + +sm_os.h: + ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h + +.include diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile new file mode 100644 index 000000000000..b3b74d8ff8c7 --- /dev/null +++ b/lib/libsm/Makefile @@ -0,0 +1,37 @@ +# $FreeBSD$ + +MAINTAINER= gshapiro@FreeBSD.org + +SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail +.PATH: ${SENDMAIL_DIR}/libsm + +CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. +CFLAGS+=-DNETINET6 -DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL + +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} + +LIB= sm + +SRCS+= sm_os.h +SRCS+= assert.c debug.c errstring.c exc.c heap.c match.c rpool.c \ + strdup.c strerror.c strl.c clrerr.c fclose.c feof.c ferror.c \ + fflush.c fget.c fpos.c findfp.c flags.c fopen.c fprintf.c \ + fpurge.c fput.c fread.c fscanf.c fseek.c fvwrite.c fwalk.c \ + fwrite.c get.c makebuf.c put.c refill.c rewind.c setvbuf.c \ + smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \ + vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \ + vsprintf.c vsscanf.c wbuf.c wsetup.c string.c stringf.c \ + xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \ + signal.c clock.c config.c shm.c mbdb.c strexit.c cf.c ldap.c \ + niprop.c mpeix.c +CLEANFILES+=sm_os.h + +INTERNALLIB= true +NOPIC= true +INTERNALSTATICLIB= true + +sm_os.h: + ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h + +.include diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 052c6b69ab70..23dd7d422e8d 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -48,6 +48,9 @@ LIBLN?= "don't use LIBLN, use LIBL" LIBM?= ${DESTDIR}${LIBDIR}/libm.a LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a +.if !defined(NO_SENDMAIL) +LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a +.endif LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a LIBMYTINFO?= "don't use LIBMYTINFO, use LIBNCURSES" LIBNCP?= ${DESTDIR}${LIBDIR}/libncp.a