summaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd24/Makefile
blob: 979f24525b8d8c538a495e07a19ebebd26487afe (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# New ports collection makefile for:		cyrus
# Version required:				1.5.2
# Date created:					May 4th 1997
# Whom:						jfitz@FreeBSD.ORG
#
# $Id: Makefile,v 1.3 1997/11/22 01:11:27 asami Exp $
#

DISTNAME=	cyrus-imapd-v1.5.2
PKGNAME=	cyrus-1.5.2
CATEGORIES=	mail
MASTER_SITES=	ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/

MAINTAINER=	jfitz@FreeBSD.ORG

LIB_DEPENDS=	tcl80\\.1\\.:${PORTSDIR}/lang/tcl80
BUILD_DEPENDS=	makedepend:${PORTSDIR}/devel/makedepend

HAS_CONFIGURE=	YES
CONFIGURE_ARGS=	--with-cyrus-prefix=${PREFIX}/cyrus \
		--with-cyrus-group=cyrus \
		--with-tcl=${PREFIX} \
		--with-login=unix_pwcheck \
		--with-auth=unix

MAN1=		cyradm.1
MAN3=		imclient.3
MAN5=		imapd.conf.5
MAN8=		arbitron.8 collectnews.8 cyrquota.8 deliver.8 imapd.8 \
		pop3d.8 reconstruct.8 rmnews.8 syncnews.8

post-configure:
		@ ${SETENV} ${MAKE_ENV} /usr/bin/perl -pi -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/imap/config.c ${WRKSRC}/imap/krbck.c

pre-install:
		@ ${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/createuser
		@ ${CP} ${WRKSRC}/man/quota.8 ${WRKSRC}/man/cyrquota.8

post-install:
		@ ${MV} ${PREFIX}/cyrus/bin/quota ${PREFIX}/cyrus/bin/cyrquota
.if !defined(NOPORTDOCS)
		${MKDIR} ${PREFIX}/share/doc/cyrus/html
.for file in acl-extension bugs changes copyrights install overview quota-extension server-design
		${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/cyrus
.endfor
		${INSTALL_DATA} ${WRKSRC}/doc/html/* ${PREFIX}/share/doc/cyrus/html
.endif
		${INSTALL_DATA} ${FILESDIR}/imapd.conf ${PREFIX}/etc
		${MKDIR} -p -m 750 /var/spool/imap
		/usr/sbin/chown cyrus.cyrus /var/spool/imap
		${MKDIR} -p -m 700 /var/pwcheck
		/usr/sbin/chown cyrus.cyrus /var/pwcheck
		${MKDIR} -p -m 750 ${PREFIX}/etc/imap
		/usr/sbin/chown cyrus.cyrus ${PREFIX}/etc/imap
		/usr/bin/touch ${PREFIX}/etc/imap/mailboxes
		/bin/chmod 640 ${PREFIX}/etc/imap/mailboxes
		/bin/mkdir -m 750 \
			${PREFIX}/etc/imap/user \
			${PREFIX}/etc/imap/quota \
			${PREFIX}/etc/imap/proc \
			${PREFIX}/etc/imap/log \
			${PREFIX}/etc/imap/msg
		/usr/sbin/chown cyrus.cyrus ${PREFIX}/etc/imap/*
		echo "Installing ${PREFIX}/etc/rc.d/cyrus.sh startup file."; \
		cat ${FILESDIR}/cyrus.sh.pt1 > ${PREFIX}/etc/rc.d/cyrus.sh
		echo PREFIX=${PREFIX} >> ${PREFIX}/etc/rc.d/cyrus.sh
		cat ${FILESDIR}/cyrus.sh.pt2 >> ${PREFIX}/etc/rc.d/cyrus.sh
		/bin/chmod 751 ${PREFIX}/etc/rc.d/cyrus.sh

.include <bsd.port.mk>