summaryrefslogtreecommitdiff
path: root/mail/popa3d/Makefile
blob: 2a2920ffe61c0521e88e2d69dac3649b614d2680 (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
71
72
73
# New ports collection makefile for:	popa3d
# Date created:		Sun Feb  6 12:31:29 MSK 2000
# Whom:			Sergey Samoyloff <gonza@techline.ru>
#
# $FreeBSD$
#

PORTNAME=	popa3d
PORTVERSION=	0.5.1
CATEGORIES=	mail
MASTER_SITES=	http://www.openwall.com/popa3d/ \
		ftp://ftp.openwall.com/pub/projects/popa3d/ \
		ftp://ftp.dataforce.net/pub/solar/
.if defined(SMTP_AFTER_POP3)
PKGNAMESUFFIX?=	-before-sendmail
.endif

MAINTAINER=	dinoex@FreeBSD.org

ALL_TARGET=	popa3d
MAN8=		popa3d.8
CFLAGS+=	-DPREFIX=${PREFIX}

.if defined(SMTP_AFTER_POP3)
EXTRA_PATCHES+=	${FILESDIR}/pop-before-sendmail.patch
PLIST=		${WRKDIR}/.PLIST.more

pre-configure:
	@${ECHO_CMD} "%%PORTDOCS%%share/doc/popa3d/POPAUTH" >${PLIST}
	@${CAT} ${PKGDIR}/pkg-plist >>${PLIST}
	@${ECHO_CMD} "share/sendmail/cf/hack/popauth.m4" >>${PLIST}

post-patch:
	@${MV} ${WRKSRC}/pop_root.c ${WRKSRC}/pop_root.c.sed
	${SED} -e "s=db1/db.h=db.h=" \
		${WRKSRC}/pop_root.c.sed > ${WRKSRC}/pop_root.c
.endif

pre-patch:
	@${MV} ${WRKSRC}/params.h ${WRKSRC}/params.h.sed
	${SED} -e "s=/var/empty=${PREFIX}/empty=" \
		${WRKSRC}/params.h.sed > ${WRKSRC}/params.h

pre-install:
	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
	@${MKDIR} ${PREFIX}/empty

do-install:
	${INSTALL} ${COPY} -o root -g wheel -m 500 \
	    ${WRKSRC}/popa3d ${PREFIX}/libexec/popa3d
	${INSTALL_MAN} ${WRKSRC}/popa3d.8 ${MANPREFIX}/man/man8
.if defined(SMTP_AFTER_POP3)
	${INSTALL_DATA} ${FILESDIR}/popauth.m4 ${CFDIR}/hack
.endif
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/share/doc/popa3d
	${INSTALL_MAN} ${WRKSRC}/DESIGN ${PREFIX}/share/doc/popa3d
	${INSTALL_MAN} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/popa3d
.if defined(SMTP_AFTER_POP3)
	${INSTALL_DATA} ${FILESDIR}/POPAUTH ${PREFIX}/share/doc/popa3d
.endif
.endif

post-install:
	@ ${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>

.if exists(${DESTDIR}/${LOCALBASE}/share/sendmail/cf/mailer/uucp.m4)
CFDIR=		${DESTDIR}${LOCALBASE}/share/sendmail/cf
.else
CFDIR=		${DESTDIR}/usr/share/sendmail/cf
.endif