aboutsummaryrefslogtreecommitdiff
path: root/mail/smfsav/Makefile
blob: 4b6ee177caa910eee914e14ea1f41d5c97300573 (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
PORTNAME=	smfsav
PORTVERSION=	1.4.0
PORTREVISION=	4
CATEGORIES=	mail
MASTER_SITES=	SF/smfs
DISTNAME=	smf-sav-${PORTVERSION}
DIST_SUBDIR=	${PORTNAME}

MAINTAINER=	sasaki12@gmail.com
COMMENT=	Sendmail Sender Address Validator
WWW=		https://smfs.sourceforge.net/

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

USERS=		smfs
GROUPS=		smfs

OPTIONS_DEFINE=	DOCS

USE_RC_SUBR=	smfsav

CPPFLAGS+=	-D_REENTRANT
LDFLAGS+=	-lmilter -lpthread

SMFSAV_RUN_DIR?=/var/run/smfs
PLIST_SUB=	SMFSAV_RUN_DIR=${SMFSAV_RUN_DIR}
SUB_FILES+=	pkg-message

CONFLICTS=	smfsav-devel

.include <bsd.port.pre.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"

post-patch:
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/readme
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.c
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/smf-sav.conf

do-build:
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${CPPFLAGS} -o smf-sav smf-sav.c ${LDFLAGS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/smf-sav ${STAGEDIR}${PREFIX}/sbin
	${INSTALL_DATA} ${WRKSRC}/smf-sav.conf ${STAGEDIR}${PREFIX}/etc/smf-sav.conf.sample
	@${MKDIR} ${STAGEDIR}${SMFSAV_RUN_DIR}
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ChangeLog readme ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>