summaryrefslogtreecommitdiff
path: root/mail/sid-milter/Makefile
blob: 7208c4a0c5c6116097af8541d9f80c1f2510a036 (plain)
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
# $NetBSD: Makefile,v 1.3 2012/04/04 22:09:49 pettai Exp $
#

DISTNAME=	sid-milter-1.0.0
PKGREVISION=	1
CATEGORIES=	mail
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=sid-milter/}

MAINTAINER=	pettai@NetBSD.org
HOMEPAGE=	http://sid-milter.sourceforge.net/
COMMENT=	Open source SPF/SenderID filter software from Sendmail, Inc
LICENSE=	sendmail-open-source-license

PKG_DESTDIR_SUPPORT=	user-destdir

BUILDLINK_API_DEPENDS.libmilter+=	libmilter>=8.13.0

USE_BUILTIN.libmilter=	NO
USE_TOOLS+=		gm4
MAKE_ENV+=		M4=${M4:Q}
PTHREAD_OPTS+=		require
RCD_SCRIPTS=		sid-filter

SIDDOC=		${PREFIX}/share/doc/sid-milter

SUBST_CLASSES+=		libs
SUBST_STAGE.libs=	pre-build
SUBST_FILES.libs=	sid-filter/Makefile.m4
SUBST_SED.libs=		-e "s|@LMBASE@|${BUILDLINK_PREFIX.libmilter}|g"
SUBST_MESSAGE.libs=	Fixing paths.

INSTALLATION_DIRS=	bin include lib ${PKGMANDIR}/man3 ${PKGMANDIR}/man8

post-extract:
	${CP} ${FILESDIR}/sid-filter.m4 ${WRKSRC}/sid-filter/Makefile.m4

do-build:
	(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./Build)

do-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${SIDDOC}
	${INSTALL_LIB} ${WRKSRC}/${SIDWORK}/libmarid/sm-marid.h \
		${DESTDIR}${PREFIX}/include
	${INSTALL_LIB} ${WRKSRC}/${SIDWORK}/libar/libar.a \
		${DESTDIR}${PREFIX}/lib
	${INSTALL_MAN} ${WRKSRC}/${SIDWORK}/libar/ar.0 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/
	${INSTALL_PROGRAM} ${WRKSRC}/${SIDWORK}/sid-filter/sid-filter \
		${DESTDIR}${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/${SIDWORK}/sid-filter/sid-filter.0 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/
	${INSTALL_DATA} ${WRKSRC}/FEATURES ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/KNOWNBUGS ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/README-SenderID ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/rfc4406.txt ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/rfc4407.txt ${DESTDIR}${SIDDOC}
	${INSTALL_DATA} ${WRKSRC}/rfc4408.txt ${DESTDIR}${SIDDOC}

.include "../../security/openssl/buildlink3.mk"
.include "../../mail/libmilter/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

# Has to be below include for bsd.pkg.mk, else substition fails
SIDWORK!=		${ECHO} obj.`${UNAME} -srm | ${TR} \  . | ${TR} \/ -`