aboutsummaryrefslogtreecommitdiff
path: root/mail/spamilter
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2005-12-17 08:41:24 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2005-12-17 08:41:24 +0000
commitb021dd00ba4c692c88b7abc7754700f3026ce91d (patch)
tree803d8c257ae20293eff4744e7f5eb613a4d0aa2c /mail/spamilter
parent4505aa75bff6ebcac56bcb057e543a33db2ebec2 (diff)
downloadports-b021dd00ba4c692c88b7abc7754700f3026ce91d.tar.gz
ports-b021dd00ba4c692c88b7abc7754700f3026ce91d.zip
Notes
Diffstat (limited to 'mail/spamilter')
-rw-r--r--mail/spamilter/Makefile47
-rw-r--r--mail/spamilter/files/patch-Makefile.tmpl92
2 files changed, 66 insertions, 73 deletions
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 <bsd.port.pre.mk>
-.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|<SUPPORT_POPAUTH\\([^>]*\\)>|\\1|" \
- -e "s|<SUPPORT_LIBSPF[^>]*>| |" \
- -e "s|<SUPPORT_SPF\\([^>]*\\)>| |" \
- -e "s|<SUPPORT_PAM[^>]*>| |" \
- -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 @@
- <ALL>
- <ALL>INCLUDEDIR= -I. -I${SMDIR}/include
- <ALL>
--<BSD>CFLAGS= -pthread
-+#<BSD>CFLAGS= -pthread
- <SunOS>CFLAGS=
- <Linux>CFLAGS= -pthread
- <ALL>#CFLAGS+= -ggdb -g3
-@@ -68,7 +68,7 @@
- <Linux> rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup
- <ALL> cd libspf; ${MAKE} $@
- <ALL>
--<BSD>install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup install-startup
-+<BSD>install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup
- <SunOS>install: spamilter install-dnsblchk install-mxlookup
- <Linux>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 @@
+ <ALL>INCLUDEDIR = -I. -I${SMDIR}/include <WITH_LIBSPF -I${LIBSPFINC}>
+ <INCDIRS>INCLUDEDIR += <X>
+ <ALL>
+-<ALL>CFLAGS = -Wall -pthread<INC_SunOS s>
++<ALL>CFLAGS += -Wall -pthread<INC_SunOS s>
+ <ALL>#CFLAGS += -ggdb -g3
+ <CFLAGS>CFLAGS += <X>
+ <OFLAGS>OFLAGS = <X>
+-<ALL>LDFLAGS =
++<ALL>LDFLAGS +=
+ <ALL>
+-<ALL>LIBS = -lmilter
++<ALL>LIBS += -lmilter
+ <Linux>LIBS += -lsmutil -lresolv -ldb
+ <SunOS>LIBS += -lsmutil -lresolv -lsocket -lnsl -lxnet -lpthread
+ <LIBS>LIBS += <X>
+-<FreeBSD>LIBDIRS = -L${SMDIR}/libmilter
++<FreeBSD>LIBDIRS += -L${SMDIR}/libmilter
+ <OpenBSD>LIBDIRS = -L${SMDIR}/libmilter
+ <SunOS>LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib
+ <Linux>LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib
+@@ -62,7 +62,7 @@
+ <ALL>clean:
+ <ALL> rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup <INC_FreeBSD ipfwmtad>
+ <ALL>
+-<ALL>install: spamilter install-dnsblchk install-dnsblupd install-mxlookup <INC_FreeBSD install-ipfwmtad install-startup>
++<ALL>install: spamilter install-dnsblchk install-dnsblupd install-mxlookup <INC_FreeBSD install-ipfwmtad>
<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR}
-@@ -92,14 +92,14 @@
+ <ALL>
+ <ALL>install-dnsblchk: dnsblchk
+@@ -84,23 +84,23 @@
<ALL> cd ..; tar --exclude CVS -cfvz spamilter.tgz spamilter/*
<ALL>
- <BSD>spamilter: Makefile ${SRCS} spamilter.o ${OBJS} libspf.a ${INCLUDES}
--<BSD> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LIBDIRS} ${LIBS}
-+<BSD> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LDFLAGS} ${LIBDIRS} ${LIBS}
- <SunOS>spamilter: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} spamilter.o libspf.a ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES}
- <SunOS> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${SVOBJS} ${LIBDIRS} ${LIBS}
- <Linux>spamilter: Makefile ${SRCS} ${NRSRCS} spamilter.o ${OBJS} libspf.a ${NROBJS} ${INCLUDES}
- <Linux> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${LIBDIRS} ${LIBS}
- <ALL>
- <BSD>dnsblchk: Makefile ${SRCS} dnsblchk.o ${OBJS} ${INCLUDES} dnsblchk.c
--<BSD> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LIBDIRS} ${LIBS}
-+<BSD> ${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}
- <SunOS>dnsblchk: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES} dnsblchk.c
- <SunOS> ${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}
- <Linux>dnsblchk: Makefile ${SRCS} ${NRSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${INCLUDES} dnsblchk.c
-@@ -123,7 +123,7 @@
- <SunOS> ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${NROBJS} -lresolv
+ <ALL>spamilter: Makefile ${SRCS} <NOT_FreeBSD ${NRSRCS}> spamilter.o ${OBJS} <NOT_FreeBSD ${NROBJS}> <WITH_LIBSPF ${LIBSPFDIR}/libspf.a> ${INCLUDES}
+-<ALL> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} <NOT_FreeBSD ${NROBJS}> <WITH_LIBSPF ${LIBSPFDIR}/libspf.a> ${LIBDIRS} ${LIBS}
++<ALL> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} <NOT_FreeBSD ${NROBJS}> <WITH_LIBSPF ${LIBSPFDIR}/libspf.a> ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <ALL>
+ <ALL>dnsblchk: Makefile ${SRCS} <NOT_FreeBSD ${NRSRCS} nstring.c> dnsblchk.o ${OBJS} <NOT_FreeBSD ${NROBJS} nstring.o> ${INCLUDES} dnsblchk.c
+-<ALL> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o <NOT_FreeBSD nstring.o ${NROBJS}> ${LIBDIRS} ${LIBS}
++<ALL> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o <NOT_FreeBSD nstring.o ${NROBJS}> ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <ALL>
+ <ALL># dnsblupd is for use with the companion shell script blupd as an Exec action
+ <ALL>dnsblupd: Makefile dnsblupd.c dnsupdate.c dns.c dnsblupd.o dnsupdate.o dns.o dnsupdate.h dns.h config.h
+-<ALL> ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LIBDIRS} ${LIBS}
++<ALL> ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <ALL>
+ <FreeBSD>ipfwmtad: Makefile ipfwmtad.c ipfw_direct.c inet.c misc.c <WITH_PAM pam.o> uam.o ipfwmtad.o ipfw_direct.o inet.o misc.o <WITH_PAM pam.o> uam.o key.o inet.h misc.h <WITH_PAM pam.h> uam.h key.h config.h
+ <FreeBSD> ${CC} ${CFLAGS} -o ipfwmtad ipfwmtad.o ipfw_direct.o inet.o misc.o <WITH_PAM pam.o> uam.o key.o <WITH_PAM -lpam> -lcrypto -lcrypt
+ <FreeBSD>
+ <ALL>mxlookup: Makefile mxlookup.c mx.c <NOT_FreeBSD ${NRSRCS}> mxlookup.o mx.o <NOT_FreeBSD ${NROBJS}> mx.h
+-<ALL> ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LIBDIRS} ${LIBS} <NOT_FreeBSD ${NROBJS}> <NOT_BSD -lresolv>
++<ALL> ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LDFLAGS} ${LIBDIRS} ${LIBS} <NOT_FreeBSD ${NROBJS}> <NOT_BSD -lresolv>
<ALL>
<ALL>iflookup: Makefile iflookup.c ifi.c iflookup.o ifi.o ifi.h
-<ALL> ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LIBDIRS} ${LIBS}
+<ALL> ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS}
<ALL>
- <ALL>libspf.a:
- <ALL> cd libspf; ${MAKE}
+ <ALL>.c.o: Makefile ${INCLUDES}
+ <ALL> ${CC} ${CFLAGS} ${OFLAGS} ${INCLUDEDIR} -c $*.c