From 812ed554f760cca0550312c6ad775b256519a905 Mon Sep 17 00:00:00 2001 From: dinoex Date: Sat, 17 Dec 2005 08:41:24 +0000 Subject: - fix missing/obsolete patches - new options WITH_PAM SMTP_AFTER_POP3 --- mail/spamilter/Makefile | 47 +++++----------- mail/spamilter/files/patch-Makefile.tmpl | 92 +++++++++++++++++++------------- 2 files changed, 66 insertions(+), 73 deletions(-) (limited to 'mail/spamilter') diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile index 2db493263558..9c6f41c5c136 100644 --- a/mail/spamilter/Makefile +++ b/mail/spamilter/Makefile @@ -12,10 +12,6 @@ MASTER_SITES= http://www.wanlink.com/spamilter/download/ MASTER_SITE_SUBDIR= dinoex EXTRACT_SUFX= .tgz -PATCH_SITES= ${MASTER_SITE_LOCAL} -PATCH_SITE_SUBDIR= ${MASTER_SITE_SUBDIR} -PATCHFILES= spamilter-0.59-2005-11-08.patch.gz - MAINTAINER= dinoex@FreeBSD.org COMMENT= A Sendmail LibMilter filter to block spam @@ -33,7 +29,7 @@ USE_REINPLACE= yes HAS_CONFIGURE= yes CFLAGS+= ${PTHREAD_CFLAGS:S=""==} LDFLAGS+= ${PTHREAD_LIBS} -MAKE_ENV+= LDFLAGS="${LDFLAGS}" +MAKE_ENV+= LDFLAGS="${LDFLAGS}" __MAKE_CONF=/dev/null BINFILES= spamilter-system-report spamilter-user-report DOCSFILES= Changelog INSTALL LICENSE docs/docs.html docs/docs.txt \ @@ -42,24 +38,21 @@ DOCSFILES= Changelog INSTALL LICENSE docs/docs.html docs/docs.txt \ .include -.if ${OSVERSION} > 500000 -ALL_TARGET= spamilter dnsblchk mxlookup iflookup -.else -PLIST_FILES+= bin/ipfwmtad -.endif -.if ${OSVERSION} > 501000 -.if ${OSVERSION} < 504000 -IGNORE= is unusable because of resource starvation in threads +.if !defined(SENDMAIL_MILTER_IN_BASE) +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ARGS+= --sendmail-dir "${LOCALBASE}" .endif + +.if defined(SMTP_AFTER_POP3) +CONFIGURE_ARGS+= --with-popauth .endif -.if !defined(SENDMAIL_MILTER_IN_BASE) -LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ARGS+= --sendmail_dir "${LOCALBASE}" +.if defined(WITH_PAM) +CONFIGURE_ARGS+= --with-pam .endif -#CFLAGS+= -DDEBUG_TIMESTAMP -PLIST_FILES+= bin/dnsblchk bin/mxlookup bin/spamilter \ +PLIST_FILES+= bin/dnsblchk bin/dnsblupd bin/ipfwmtad bin/mxlookup \ + bin/spamilter \ bin/spamilter-system-report bin/spamilter-user-report \ etc/rc.d/milter-spamilter.sh.sample .if !defined(NOPORTDOCS) @@ -86,23 +79,7 @@ pre-configure: ${WRKSRC}/spamilter.c \ ${WRKSRC}/docs/docs.html ${WRKSRC}/docs/docs.txt -post-configure: - ${REINPLACE_CMD} \ - -e "s|^CFLAGS=|#CFLAGS=|" \ - -e "s|^LDFLAGS=|#LDFLAGS=|" \ - -e "s|^LIBDIRS=|#LIBDIRS=|" \ - -e "s|/usr/local/bind|${LOCALBASE}/bind|" \ - -e "s|/usr/local/|${PREFIX}/|" \ - -e "s|]*\\)>|\\1|" \ - -e "s|]*>| |" \ - -e "s|]*\\)>| |" \ - -e "s|]*>| |" \ - -e "s|uam.[hco]| |" \ - ${WRKSRC}/Makefile - ${REINPLACE_CMD} \ - -e "s|#define SUPPORT_LIBSPF|#undef SUPPORT_LIBSPF|" \ - -e "s|#define SUPPORT_PAM|#undef SUPPORT_PAM|" \ - ${WRKSRC}/config.h +xpost-configure: .if ${OSVERSION} > 500000 ${REINPLACE_CMD} \ -e "s| install-ipfwmtad | |" \ diff --git a/mail/spamilter/files/patch-Makefile.tmpl b/mail/spamilter/files/patch-Makefile.tmpl index 130a77633c14..5c63cdefcb20 100644 --- a/mail/spamilter/files/patch-Makefile.tmpl +++ b/mail/spamilter/files/patch-Makefile.tmpl @@ -1,46 +1,62 @@ ---- Makefile.tmpl.orig Thu Apr 29 15:46:00 2004 -+++ Makefile.tmpl Mon Aug 23 16:23:03 2004 -@@ -27,7 +27,7 @@ - - INCLUDEDIR= -I. -I${SMDIR}/include - --CFLAGS= -pthread -+#CFLAGS= -pthread - CFLAGS= - CFLAGS= -pthread - #CFLAGS+= -ggdb -g3 -@@ -68,7 +68,7 @@ - rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup - cd libspf; ${MAKE} $@ - --install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup install-startup -+install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup - install: spamilter install-dnsblchk install-mxlookup - install: spamilter install-dnsblchk install-mxlookup +--- Makefile.tmpl.orig Sun Nov 27 21:52:05 2005 ++++ Makefile.tmpl Sat Dec 17 09:14:03 2005 +@@ -26,17 +26,17 @@ + INCLUDEDIR = -I. -I${SMDIR}/include + INCLUDEDIR += + +-CFLAGS = -Wall -pthread ++CFLAGS += -Wall -pthread + #CFLAGS += -ggdb -g3 + CFLAGS += + OFLAGS = +-LDFLAGS = ++LDFLAGS += + +-LIBS = -lmilter ++LIBS += -lmilter + LIBS += -lsmutil -lresolv -ldb + LIBS += -lsmutil -lresolv -lsocket -lnsl -lxnet -lpthread + LIBS += +-LIBDIRS = -L${SMDIR}/libmilter ++LIBDIRS += -L${SMDIR}/libmilter + LIBDIRS = -L${SMDIR}/libmilter + LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib + LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib +@@ -62,7 +62,7 @@ + clean: + rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup + +-install: spamilter install-dnsblchk install-dnsblupd install-mxlookup ++install: spamilter install-dnsblchk install-dnsblupd install-mxlookup install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR} -@@ -92,14 +92,14 @@ + + install-dnsblchk: dnsblchk +@@ -84,23 +84,23 @@ cd ..; tar --exclude CVS -cfvz spamilter.tgz spamilter/* - spamilter: Makefile ${SRCS} spamilter.o ${OBJS} libspf.a ${INCLUDES} -- ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LIBDIRS} ${LIBS} -+ ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LDFLAGS} ${LIBDIRS} ${LIBS} - spamilter: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} spamilter.o libspf.a ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES} - ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${SVOBJS} ${LIBDIRS} ${LIBS} - spamilter: Makefile ${SRCS} ${NRSRCS} spamilter.o ${OBJS} libspf.a ${NROBJS} ${INCLUDES} - ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${LIBDIRS} ${LIBS} - - dnsblchk: Makefile ${SRCS} dnsblchk.o ${OBJS} ${INCLUDES} dnsblchk.c -- ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LIBDIRS} ${LIBS} -+ ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS} - dnsblchk: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES} dnsblchk.c - ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${NROBJS} ${SVOBJS} ${LIBDIRS} ${LIBS} - dnsblchk: Makefile ${SRCS} ${NRSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${INCLUDES} dnsblchk.c -@@ -123,7 +123,7 @@ - ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${NROBJS} -lresolv + spamilter: Makefile ${SRCS} spamilter.o ${OBJS} ${INCLUDES} +- ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} ${LIBDIRS} ${LIBS} ++ ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} ${LDFLAGS} ${LIBDIRS} ${LIBS} + + dnsblchk: Makefile ${SRCS} dnsblchk.o ${OBJS} ${INCLUDES} dnsblchk.c +- ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LIBDIRS} ${LIBS} ++ ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS} + + # dnsblupd is for use with the companion shell script blupd as an Exec action + dnsblupd: Makefile dnsblupd.c dnsupdate.c dns.c dnsblupd.o dnsupdate.o dns.o dnsupdate.h dns.h config.h +- ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LIBDIRS} ${LIBS} ++ ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LDFLAGS} ${LIBDIRS} ${LIBS} + + ipfwmtad: Makefile ipfwmtad.c ipfw_direct.c inet.c misc.c uam.o ipfwmtad.o ipfw_direct.o inet.o misc.o uam.o key.o inet.h misc.h uam.h key.h config.h + ${CC} ${CFLAGS} -o ipfwmtad ipfwmtad.o ipfw_direct.o inet.o misc.o uam.o key.o -lcrypto -lcrypt + + mxlookup: Makefile mxlookup.c mx.c mxlookup.o mx.o mx.h +- ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LIBDIRS} ${LIBS} ++ ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LDFLAGS} ${LIBDIRS} ${LIBS} iflookup: Makefile iflookup.c ifi.c iflookup.o ifi.o ifi.h - ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS} - libspf.a: - cd libspf; ${MAKE} + .c.o: Makefile ${INCLUDES} + ${CC} ${CFLAGS} ${OFLAGS} ${INCLUDEDIR} -c $*.c -- cgit