summaryrefslogtreecommitdiff
path: root/mail/spamd/Makefile
blob: 2dec43ad8b76347faa1b96c7c0e554b63c94885a (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
70
71
72
73
74
75
76
77
78
# $NetBSD: Makefile,v 1.13 2008/06/26 20:59:51 peter Exp $

DISTNAME=		spamd-20060330
CATEGORIES=		mail
MASTER_SITES=		http://nedbsd.nl/~ppostma/pf/

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.benzedrine.cx/relaydb.html
COMMENT=		OpenBSD spam deferral daemon

ONLY_FOR_PLATFORM=	NetBSD-*-* OpenBSD-*-* FreeBSD-*-* DragonFly-*-*

PKG_DESTDIR_SUPPORT=	user-destdir

NO_CONFIGURE=		yes

SPAMD_HOME=		${VARBASE}/chroot/spamd
OWN_DIRS=		${SPAMD_HOME}

CPPFLAGS+=		-DPATH_SPAMD_HOME=\"${SPAMD_HOME}\"
CPPFLAGS+=		-DPATH_SPAMD_DB=\"${VARBASE}/db/spamd\"
CPPFLAGS+=		-DPATH_PFCTL=\"${PFCTL}\"
CPPFLAGS+=		-DPATH_SPAMD_CONF=\"${SPAMD_CONF}\"

PKG_GROUPS=		_spamd
PKG_USERS=		_spamd:_spamd
PKG_GECOS._spamd=	Spam Daemon User
PKG_HOME._spamd=	${SPAMD_HOME}

RCD_SCRIPTS=		pfspamd

SPAMD_CONF=		${PKG_SYSCONFDIR}/spamd.conf
CONF_FILES=		${PREFIX}/share/examples/spamd/spamd.conf ${SPAMD_CONF}

SUBST_CLASSES+=		fix
SUBST_STAGE.fix=	post-patch
SUBST_FILES.fix=	spamd/spamd.8
SUBST_FILES.fix+=	spamd-setup/spamd-setup.8
SUBST_SED.fix=		-e 's,/etc/spamd.conf,${SPAMD_CONF},g'
SUBST_MESSAGE.fix=	Fixing configuration paths.

INSTALLATION_DIRS+=	libexec sbin ${PKGMANDIR}/cat5 ${PKGMANDIR}/man5
INSTALLATION_DIRS+=	${PKGMANDIR}/cat8 ${PKGMANDIR}/man8 share/examples/spamd

do-install:
	${INSTALL_MAN} ${WRKSRC}/man/spamd.conf.5 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
	${INSTALL_MAN} ${WRKSRC}/man/spamd.conf.cat5 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/cat5/spamd.conf.0
	${INSTALL_MAN} ${WRKSRC}/spamd/spamd.8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/spamd/spamd.cat8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/cat8/spamd.0
	${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.cat8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/cat8/spamd-setup.0
	${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.cat8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/cat8/spamdb.0
	${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.cat8 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/cat8/spamlogd.0

	${INSTALL_PROGRAM} ${WRKSRC}/spamd-setup/spamd-setup \
		${DESTDIR}${PREFIX}/libexec
	${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd \
		${DESTDIR}${PREFIX}/libexec
	${INSTALL_PROGRAM} ${WRKSRC}/spamdb/spamdb \
		${DESTDIR}${PREFIX}/sbin
	${INSTALL_PROGRAM} ${WRKSRC}/spamlogd/spamlogd \
		${DESTDIR}${PREFIX}/libexec
	${INSTALL_DATA} ${WRKSRC}/etc/spamd.conf ${DESTDIR}${PREFIX}/share/examples/spamd

.include "../../mk/pf.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"