blob: 0a5dec5d95ba20c998dcaa3c8567467aba2fdeba (
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# New ports collection makefile for: ezmlm-idx
# Date created: 28 November 1998
# Whom: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
#
# $FreeBSD$
#
PORTNAME= ezmlm-idx
PORTVERSION= 0.40
CATEGORIES= mail
MASTER_SITES= ftp://ftp.ezmlm.org/pub/patches/ \
ftp://ftp.rivertown.net/pub/ezmlm/ \
ftp://ftp.crc.ca/ftp/packages/mail/ezmlm-patches-fred/ \
http://ftp.crc.ca/ftp/ftp/packages/mail/ezmlm-patches-fred/ \
ftp://ftp.win.or.jp/pub/network/mail/qmail/ezmlm-idx/ \
ftp://jp.ezmlm.org/ezmlm/ \
ftp://de.ezmlm.org/pub/ \
ftp://gd.tuwien.ac.at/infosys/mail/qmail/ezmlm-patches/ \
http://gd.tuwien.ac.at/infosys/mail/qmail/ezmlm-patches/ \
ftp://pl.ezmlm.org/ \
ftp://uk.ezmlm.org/pub/ \
ftp://ftp.eos.hokudai.ac.jp/pub/mail/qmail/ezmlm-idx/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
ezmlm-${EZMLM_VERSION}${EXTRACT_SUFX}
MAINTAINER= tom@FreeBSD.org
# QMAIL_DIR is the directory where qmail is installed
QMAIL_DIR?= /var/qmail
# LANGUAGE is the ISO code for the language to use in ezmlmrc
LANGUAGE?= en_US
RUN_DEPENDS= ${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
# If WITH_MYSQL is defined, build with MySQL extensions
.if defined(WITH_MYSQL)
ALL_TARGET= it ${LANGUAGE} mysql
LIB_DEPENDS+= mysqlclient.6:${PORTSDIR}/databases/mysql322-client
.else
ALL_TARGET= it ${LANGUAGE}
.endif
NO_PACKAGE= Unsure of djb's license
WRKSRC= ${WRKDIR}/ezmlm-${EZMLM_VERSION}
MAN1= ezmlm-accept.1 ezmlm-archive.1 ezmlm-cgi.1 ezmlm-check.1 \
ezmlm-clean.1 ezmlm-cron.1 ezmlm-gate.1 ezmlm-get.1 \
ezmlm-glconf.1 ezmlm-idx.1 ezmlm-issubn.1 ezmlm-limit.1 \
ezmlm-list.1 ezmlm-make.1 ezmlm-manage.1 ezmlm-mktab.1 \
ezmlm-moderate.1 ezmlm-reject.1 ezmlm-request.1 \
ezmlm-return.1 ezmlm-send.1 ezmlm-split.1 ezmlm-store.1 \
ezmlm-sub.1 ezmlm-test.1 ezmlm-tstdig.1 ezmlm-unsub.1 \
ezmlm-warn.1 ezmlm-weed.1
MAN5= ezmlm.5 ezmlmglrc.5 ezmlmrc.5 ezmlmsubrc.5
DIFF_MSG= Cannot Make and Install with different PREFIX or QMAIL_DIR
MY_PROGRAMS= archive cgi clean cron gate get idx issubn limit \
list make manage moderate request reject return \
send split store sub tstdig unsub warn weed
MY_SCRIPTS= accept check glconf mktab test
MY_CONFIG= ezmlmglrc ezmlmrc ezmlmsubrc
EZMLM_VERSION= 0.53
PLIST= ${WRKDIR}/pkg-plist
pre-patch:
@${MV} -f ${WRKDIR}/ezmlm-idx-${PORTVERSION}/* ${WRKSRC}
@cd ${WRKSRC} && ${PATCH} < idx.patch
post-patch:
@${ECHO} ${PREFIX}/bin > ${WRKSRC}/conf-bin
@${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
@${ECHO} ${CC} -s > ${WRKSRC}/conf-ld
@${ECHO} ${PREFIX}/man > ${WRKSRC}/conf-man
@${ECHO} ${QMAIL_DIR} > ${WRKSRC}/conf-qmail
@${ECHO} ${PREFIX} > ${WRKDIR}/.PPREFIX
@${ECHO} ${QMAIL_DIR} >> ${WRKDIR}/.PPREFIX
@${ECHO} ${NOPORTDOCS} ${WITH_MYSQL} >> ${WRKDIR}/.PPREFIX
@${MV} ${WRKSRC}/idx.h ${WRKSRC}/idx.h.orig
@${SED} -e 's#/etc/ezmlm/#'${PREFIX}'/etc/ezmlm/#' \
< ${WRKSRC}/idx.h.orig > ${WRKSRC}/idx.h
@${CP} ${PKGDIR}/pkg-plist ${WRKDIR}
.if !defined(NOPORTDOCS)
@${CAT} ${PKGDIR}/pkg-plist.docs >> ${WRKDIR}/pkg-plist
.endif
pre-install:
@${ECHO} ${PREFIX} > ${WRKDIR}/.IPREFIX
@${ECHO} ${QMAIL_DIR} >> ${WRKDIR}/.IPREFIX
@${ECHO} ${NOPORTDOCS} ${WITH_MYSQL} >> ${WRKDIR}/.IPREFIX
@diff ${WRKDIR}/.[PI]PREFIX || (${ECHO} ${DIFF_MSG} && exit 1)
do-install:
.for file in ${MY_PROGRAMS}
@${INSTALL_PROGRAM} ${WRKSRC}/ezmlm-${file} ${PREFIX}/bin
.endfor
.for file in ${MY_SCRIPTS}
@${INSTALL_SCRIPT} ${WRKSRC}/ezmlm-${file} ${PREFIX}/bin
.endfor
@${MKDIR} ${PREFIX}/etc/ezmlm
.for file in ${MY_CONFIG}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/etc/ezmlm/${file}.sample
.endfor
.for file in ${MAN1}
@${INSTALL_MAN} ${WRKSRC}/${file} ${PREFIX}/man/man1
.endfor
.for file in ${MAN5}
@${INSTALL_MAN} ${WRKSRC}/${file} ${PREFIX}/man/man5
.endfor
.if !defined(NOPORTDOCS)
@${ECHO} "===> Copying documents to ${PREFIX}/share/doc/ezmlm-idx"
@${MKDIR} ${PREFIX}/share/doc/ezmlm-idx
.for file in CHANGES.idx DOWNGRADE.idx FAQ.idx INSTALL.idx README.idx UPGRADE.idx
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/ezmlm-idx
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
|