aboutsummaryrefslogtreecommitdiffstats
path: root/mail/milter-regex/Makefile
blob: e5c8369f175f3fa7bf8cf6fb57e46a9e48724bd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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=    1.8
CATEGORIES= mail
MASTER_SITES=   http://www.benzedrine.cx/

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    Milter plugin to sendmail for regular expression filtering

LICENSE=    BSD
LICENSE_FILE=   ${FILESDIR}/COPYRIGHT

DIST_SUBDIR=    repacked
MAILUSER?=  mailnull
MAN8=       milter-regex.8
PLIST_FILES=    libexec/milter-regex
USE_RC_SUBR=    milterregex.sh
SPOOLDIR?=  /var/run/milter-regex
SUB_LIST=   SPOOLDIR=${SPOOLDIR}

.include <bsd.port.pre.mk>

.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"

post-patch:
    @${REINPLACE_CMD} -e \
        "s:/etc/milter-regex.conf:${PREFIX}/etc/milter-regex.conf:g; \
        s:/var/spool/milter-regex:${SPOOLDIR}:g; \
        s:_milter-regex:${MAILUSER}:g;" ${WRKSRC}/milter-regex.c
    @${REINPLACE_CMD} -e \
        "s:/etc/milter-regex.conf:${PREFIX}/etc/milter-regex.conf:g; \
        s:/var/spool/milter-regex:${SPOOLDIR}:g; \
        s:mailstats 1:mailstats 8:;" ${WRKSRC}/milter-regex.8
    @${REINPLACE_CMD} -e "s:-lpthread:${PTHREAD_LIBS}:g; \
        s:-I/usr/src/gnu/usr.sbin/sendmail/include:${PTHREAD_CFLAGS}:g; \
        s:-L/usr/local/lib:-L${LOCALBASE}/lib:g; \
        s/-Werror//g"  ${WRKSRC}/Makefile

do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/milter-regex ${PREFIX}/libexec
    @${INSTALL_MAN} ${WRKSRC}/milter-regex.8 ${PREFIX}/man/man8
    @${INSTALL} -d -o ${MAILUSER} -g daemon -m 0700 ${SPOOLDIR}

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>