aboutsummaryrefslogtreecommitdiff
path: root/mail/spamilter
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2013-12-05 08:39:07 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2013-12-05 08:39:07 +0000
commit08a42c6119557e8befdb797330095bc015ffc108 (patch)
tree530eb70688084ff3438305da889caa5ddd465f6a /mail/spamilter
parent41238e2863061b1c03e67c431d75bb325c719c6d (diff)
downloadports-08a42c6119557e8befdb797330095bc015ffc108.tar.gz
ports-08a42c6119557e8befdb797330095bc015ffc108.zip
Notes
Diffstat (limited to 'mail/spamilter')
-rw-r--r--mail/spamilter/Makefile33
-rw-r--r--mail/spamilter/files/patch-Makefile.tmpl30
2 files changed, 36 insertions, 27 deletions
diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile
index 7a2bf9f3bc84..b51046225786 100644
--- a/mail/spamilter/Makefile
+++ b/mail/spamilter/Makefile
@@ -14,8 +14,9 @@ COMMENT= A Sendmail LibMilter filter to block spam
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/LICENSE
-NO_STAGE= yes
+NEED_ROOT= yes
+USES= shebangfix
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --have-resn
USE_RC_SUBR= spamilter
@@ -25,6 +26,7 @@ LDFLAGS+= ${PTHREAD_LIBS}
MAKE_ENV+= __MAKE_CONF=/dev/null
BINFILES= spamilter-system-report spamilter-user-report
+SHEBANG_FILES= ${BINFILES}
DOCSFILES= Changelog INSTALL LICENSE docs/docs.html docs/docs.txt \
conf/db.rcpt conf/db.rdnsbl conf/db.sndr \
conf/policy.html conf/spamilter.rc
@@ -39,6 +41,13 @@ OPTIONS_DEFINE= SMTP_AFTER_POP3 PAM LIBSPF
SMTP_AFTER_POP3_DESC= SMTP after POP3
LIBSPF_DESC= build with libspf
+SMTP_AFTER_POP3_CONFIGURE_ON= --with-popauth
+PAM_CONFIGURE_ON= --with-pam
+LIBSPF_BUILD_DEPENDS= ${LOCALBASE}/lib/libspf.a:${PORTSDIR}/mail/libspf
+LIBSPF_CONFIGURE_ON= --with-libspf ${LOCALBASE}
+LIBSPF_CFLAGS= -I${LOCALBASE}/include
+LIBSPF_LDFLAGS= -L${LOCALBASE}/lib
+
.include <bsd.port.options.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
@@ -49,21 +58,6 @@ CONFIGURE_ARGS+= --sendmail-dir "${LOCALBASE}"
CONFIGURE_ARGS+= --sendmail-dir "/usr"
.endif
-.if ${PORT_OPTIONS:MSMTP_AFTER_POP3}
-CONFIGURE_ARGS+= --with-popauth
-.endif
-
-.if ${PORT_OPTIONS:MPAM}
-CONFIGURE_ARGS+= --with-pam
-.endif
-
-.if ${PORT_OPTIONS:MLIBSPF}
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libspf.a:${PORTSDIR}/mail/libspf
-CONFIGURE_ARGS+= --with-libspf ${LOCALBASE}
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-.endif
-
post-extract:
${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
@@ -76,14 +70,9 @@ pre-configure:
-e "s=/usr/local/=${PREFIX}/=" \
${WRKSRC}/Makefile.tmpl
-xpost-configure:
- ${REINPLACE_CMD} \
- -e "s| install-ipfwmtad | |" \
- ${WRKSRC}/Makefile
-
post-install:
.for i in ${BINFILES}
- ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/bin/
.endfor
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/mail/spamilter/files/patch-Makefile.tmpl b/mail/spamilter/files/patch-Makefile.tmpl
index 5c63cdefcb20..8bc40ff38557 100644
--- a/mail/spamilter/files/patch-Makefile.tmpl
+++ b/mail/spamilter/files/patch-Makefile.tmpl
@@ -1,5 +1,5 @@
---- Makefile.tmpl.orig Sun Nov 27 21:52:05 2005
-+++ Makefile.tmpl Sat Dec 17 09:14:03 2005
+--- Makefile.tmpl.orig 2005-11-27 21:52:05.000000000 +0100
++++ Makefile.tmpl 2013-12-05 09:24:17.000000000 +0100
@@ -26,17 +26,17 @@
<ALL>INCLUDEDIR = -I. -I${SMDIR}/include <WITH_LIBSPF -I${LIBSPFINC}>
<INCDIRS>INCLUDEDIR += <X>
@@ -22,16 +22,36 @@
<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 @@
+@@ -62,45 +62,45 @@
<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 -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR}
+<ALL>install: spamilter install-dnsblchk install-dnsblupd install-mxlookup <INC_FreeBSD install-ipfwmtad>
- <ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR}
++<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${DESTDIR}${BINDIR}
<ALL>
<ALL>install-dnsblchk: dnsblchk
-@@ -84,23 +84,23 @@
+-<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} dnsblchk ${BINDIR}
++<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} dnsblchk ${DESTDIR}${BINDIR}
+ <ALL>
+ <ALL>install-dnsblupd: dnsblupd
+-<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} dnsblupd ${BINDIR}
++<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} dnsblupd ${DESTDIR}${BINDIR}
+ <ALL>
+ <ALL>install-mxlookup: mxlookup
+-<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} mxlookup ${BINDIR}
++<ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} mxlookup ${DESTDIR}${BINDIR}
+ <ALL>
+ <FreeBSD>install-ipfwmtad: ipfwmtad
+-<FreeBSD> install -c -m 0500 -g ${BINGRP} -o ${BINOWN} ipfwmtad ${BINDIR}
++<FreeBSD> install -c -m 0500 -g ${BINGRP} -o ${BINOWN} ipfwmtad ${DESTDIR}${BINDIR}
+ <FreeBSD>
+ <FreeBSD>install-startup:
+-<FreeBSD> if [ ! -e ${RCDIR}/${RCSHELL} ]; then install -c -m ${RCMODE} -g ${BINGRP} -o ${BINOWN} ${RCSHELL} ${RCDIR}; fi
++<FreeBSD> if [ ! -e ${RCDIR}/${RCSHELL} ]; then install -c -m ${RCMODE} -g ${BINGRP} -o ${BINOWN} ${RCSHELL} ${DESTDIR}${RCDIR}; fi
+ <FreeBSD>
+ <ALL>tar: clean
<ALL> cd ..; tar --exclude CVS -cfvz spamilter.tgz spamilter/*
<ALL>
<ALL>spamilter: Makefile ${SRCS} <NOT_FreeBSD ${NRSRCS}> spamilter.o ${OBJS} <NOT_FreeBSD ${NROBJS}> <WITH_LIBSPF ${LIBSPFDIR}/libspf.a> ${INCLUDES}