summaryrefslogtreecommitdiff
path: root/mail/yatsvrs/Makefile
blob: 22f7ce1593021cd6d61861e49de561c8c33899cf (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
# $NetBSD: Makefile,v 1.5 2002/02/13 15:53:10 taca Exp $
#

DISTNAME=		yatsvrs-5.00p6
PKGNAME=		${DISTNAME:S/p/./}
CATEGORIES=		mail
MASTER_SITES=		ftp://ftp.jepro.co.jp/pub/jepro/yatsvr/

MAINTAINER=		taca@netbsd.org
HOMEPAGE=		http://www.jepro.co.jp/products/yat/
COMMENT=		Extended POP3 server and some supporting servers

CONFLICTS=		ascyd-* yatsvr4-*

GNU_CONFIGURE=		yes

YATSVR_LOGFAC?=		LOG_LOCAL4
YATSVR_MINGID?=		1001
YATSVR_MAXGID?=		64999
PKG_SYSCONFSUBDIR?=	yatsvr5
OLDCONFDIR=		${PREFIX}/etc/yat
DOCS=			IMPORTANT README UPDATE doc/YATCONF doc/YATEXT4
DOCDIR=			${PREFIX}/share/doc/yatsvr5
EXAMPLES=		yatrc2 yatsvrrc
EXAMPLESDIR=		${PREFIX}/share/examples/yatsvr5

CONFIGURE_ARGS+=	--enable-popper-xmit
CONFIGURE_ARGS+=	--with-log-facility=${YATSVR_LOGFAC}
CONFIGURE_ARGS+=	--with-yat-sys-dir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+=	--with-yat-sys-old-dir-v4=${OLDCONFDIR}

DEINSTALL_FILE=		${WRKDIR}/DEINSTALL
INSTALL_FILE=		${WRKDIR}/INSTALL

DEFAULT_ADMIN=		root

FILES_SUBST+=		AWK=${AWK:Q}
FILES_SUBST+=		CAT=${CAT:Q}
FILES_SUBST+=		CMP=${CMP:Q}
FILES_SUBST+=		CHMOD=${CHMOD:Q}
FILES_SUBST+=		MKDIR=${MKDIR:Q}
FILES_SUBST+=		RM=${RM:Q}
FILES_SUBST+=		RMDIR=${RMDIR:Q}
FILES_SUBST+=		PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+=		DEFAULT_ADMIN=${DEFAULT_ADMIN}
FILES_SUBST+=		EXAMPLESDIR=${EXAMPLESDIR}
FILES_SUBST+=		EXAMPLES=${EXAMPLES:Q}
FILES_SUBST+=		YATSVR_INSTALL_DATA=${INSTALL_DATA:Q}
FILES_SUBST+=		YATSVR_MINGID=${YATSVR_MINGID}
FILES_SUBST+=		YATSVR_MAXGID=${YATSVR_MAXGID}
FILES_SUBST_SED=	${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}

MESSAGE_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR}

post-build:
	${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
	${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}

post-install:
	${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
	${INSTALL_DATA_DIR} ${DOCDIR}
.for f in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/$f ${DOCDIR}
.endfor
	${INSTALL_DATA_DIR} ${EXAMPLESDIR}
.for f in ${EXAMPLES}
	${INSTALL_DATA} ${WRKSRC}/sample/$f ${EXAMPLESDIR}/$f.example
.endfor
	PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL

.include "../../mk/bsd.pkg.mk"