freebsd-ports/mail/milter-regex/Makefile
Trevor Johnson 51d92e7bab Enable compilation on FreeBSD 5.2-BETA by avoiding "log" namespace
conflict.

PR:		59975
Submitted by:   Volker Stolz of the Lehrstuhl fur Informatik II at
		RWTH Aachen
2003-12-09 18:42:22 +00:00

43 lines
1.1 KiB
Makefile

# New ports collection makefile for: milter-regex
# Date created: 2003-10-03
# Whom: trevor
#
# based on the OpenBSD port by Daniel Hartmeier (dhartmei on OpenBSD.org)
# $FreeBSD$
#
PORTNAME= milter_regex
PORTVERSION= 0.6
CATEGORIES= mail
MASTER_SITES= http://www.benzedrine.cx/
DISTNAME= milter-regex-${PORTVERSION}
MAINTAINER= trevor@FreeBSD.org
COMMENT= "Milter plugin to sendmail for regular expression filtering"
MAN8= milter-regex.8
PLIST= ${WRKDIR}/pkg-plist
pre-everything::
.if !exists(/usr/lib/libmilter.a)
${ECHO_CMD} "Fatal: milter required, see instructions in DESCR"
exit 1
.endif
post-patch:
.for ii in Makefile milter-regex.c rules.c
${MV} ${WRKSRC}/${ii} ${WRKSRC}/${ii}.orig
${SED} -e "s:-lpthread:${PTHREAD_LIBS}:g; \
s:-I/usr/src/gnu/usr.sbin/sendmail/include:${PTHREAD_CFLAGS}:g; \
s/[[:<:]]log(/milterlog(/g" < ${WRKSRC}/${ii}.orig > ${WRKSRC}/${ii}
.endfor
pre-install:
${ECHO_CMD} libexec/milter-regex > ${PLIST}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/milter-regex ${PREFIX}/libexec
${INSTALL_MAN} ${WRKSRC}/milter-regex.8 ${PREFIX}/man/man8
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>