aboutsummaryrefslogtreecommitdiffstats
path: root/mail/sid-milter/Makefile
blob: 816fc4d0140396545fb2d601e00b8a9d64961e09 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# New ports collection makefile for:    sid-milter
# Date created:             18. Dec 2004
# Whom:                 dirk.meyer@dinoex.sub.org
#
# $FreeBSD$
#

PORTNAME=   sid-milter
PORTVERSION=    0.2.14
PORTREVISION=   2
CATEGORIES= mail
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sid-milter

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    An sid and spf milter for Sendmail

RESTRICTED= may incorporate intellectual property, possible patent issues

WCONF=      ${WRKSRC}/devtools/Site
MAN8=       sid-filter.8
DOCSFILES=  INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES
INSTALL_WRKSRC= ${WRKSRC}/sid-filter
PLIST_FILES=    libexec/sid-filter
PORTDOCS=   ${DOCSFILES}

IPCCHECK!=  ipcrm -q 0 2>&1 || true
.if ${IPCCHECK:Mimplemented}
IGNORE=     your system does not support sysvipc
.endif

SITE+=      ${FILESDIR}/site.config.m4
.if defined(WITH_SIDMILTER_AR)
MAN3=       ar.3
PLIST_FILES+=   include/libar.h lib/libar.a
.endif
.if defined(WITHOUT_RC_NG)
PLIST_FILES+=   etc/rc.d/milter-sid.sh.sample
.else
USE_RC_SUBR=    milter-sid.sh
.endif

.include <bsd.port.pre.mk>

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

.if defined(WITH_SENDMAIL_PORT)
SITE+=      ${FILESDIR}/site.config.m4.milter
.endif

pre-configure:
.if defined(WITHOUT_RC_NG)
    @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/milter-sid.sh \
        > ${WRKSRC}/milter-sid.sh
.endif
    ${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \
        -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|' \
        -e "s|\`-O'|\`${CFLAGS}'|g" \
        -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
        ${WRKSRC}/devtools/OS/FreeBSD
    ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
        -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
        ${SITE} > ${WCONF}/site.config.m4

post-install:
.if defined(WITHOUT_RC_NG)
    ${INSTALL_SCRIPT} ${WRKSRC}/milter-sid.sh \
        ${PREFIX}/etc/rc.d/milter-sid.sh.sample
.endif
.for i in ${MAN8}
    @${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
    ${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8/
.endfor
.if defined(WITH_SIDMILTER_AR)
    @(cd ${WRKSRC}/libar && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.for i in ${MAN3}
    @${RM} -f ${MANPREFIX}/man/cat3/${i} ${MANPREFIX}/man/cat3/${i}.gz
    ${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man3/
.endfor
    ${INSTALL_DATA} ${WRKSRC}/libar/ar.h ${PREFIX}/include/libar.h
.endif
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for i in ${DOCSFILES}
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/
.endfor
.endif

.include <bsd.port.post.mk>