summaryrefslogtreecommitdiff
path: root/mail/mopher/Makefile
blob: 2cf7f2e6913cc0f7bd133149c4a1545037a2a43b (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
# $NetBSD: Makefile,v 1.3 2015/02/27 12:18:21 gdt Exp $

DISTNAME=		mopher-0.5.3
CATEGORIES=		mail
MASTER_SITES=		http://mopher.org/download/

OWNER=			petar@smokva.net
HOMEPAGE=		http://mopher.org/
COMMENT=		Versatile mail filter
LICENSE=		mit

.include "../../mk/bsd.prefs.mk"

MOPHER_USER?=		mopher
MOPHER_GROUP?=		${MOPHER_USER}
MOPHER_HOME?=		${VARBASE}/mopher
MOPHER_RUN?=		${VARBASE}/run/mopher

FILES_SUBST+=		MOPHER_USER=${MOPHER_USER}
FILES_SUBST+=		MOPHER_GROUP=${MOPHER_GROUP}
FILES_SUBST+=		MOPHER_HOME=${MOPHER_HOME}
FILES_SUBST+=		MOPHER_RUN=${MOPHER_RUN}
FILES_SUBST+=		INSTALL=${INSTALL}

USE_LANGUAGES=		c
HAS_CONFIGURE=		yes
CONFIGURE_ARGS+=	--prefix=${PREFIX}
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFBASE}
CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+=	--localstatedir=${VARBASE}

.include "options.mk"

BUILD_DEFS+=		PKG_SYSCONFBASE VARBASE
BUILD_TARGET=		build

PKG_SYSCONFSUBDIR=	mopher
INSTALLATION_DIRS+=	${EGDIR}
EGDIR=			${PREFIX}/share/examples/mopher
CONF_FILES+=		${EGDIR}/mopherd.conf
CONF_FILES+=		${PKG_SYSCONFDIR}/mopherd.conf
CONF_FILES+=		${EGDIR}/mopherd.acl
CONF_FILES+=		${PKG_SYSCONFDIR}/mopherd.acl
CONF_FILES+=		${EGDIR}/effective_tld_names.dat
CONF_FILES+=		${PKG_SYSCONFDIR}/effective_tld_names.dat
MAKE_ENV+=		CONFIG_XPATH=${EGDIR}

PKG_GROUPS=		${MOPHER_GROUP}
PKG_USERS=		${MOPHER_USER}:${MOPHER_GROUP}
OWN_DIRS_PERMS+=	${MOPHER_HOME} ${MOPHER_USER} ${MOPHER_GROUP} 2755
RCD_SCRIPTS+=		mopherd

# FIXME: sent upstream; remove this on next upgrade
SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	pre-configure
SUBST_MESSAGE.conf=	Adding custom mopherd.conf
SUBST_FILES.conf=	config/Makefile.in
SUBST_SED.conf=		-e 's,mopherd.acl$$,& mopherd.conf,'

# FIXME: sent upstream; remove this on next upgrade
pre-build:
	${SED} ${FILES_SUBST_SED} ${FILESDIR}/mopherd.conf \
		>${WRKSRC}/config/mopherd.conf
	${SED} ${FILES_SUBST_SED} ${FILESDIR}/mopherd.acl \
		>${WRKSRC}/config/mopherd.acl

.include "../../mail/libmilter/buildlink3.mk"
.include "../../devel/libidn/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"