blob: ca3e979f236075ff6aa79428b0b06f8418c618ed (
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
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
|
# Created by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
# $FreeBSD$
PORTNAME= ezmlm-idx
PORTVERSION= 7.2.2
CATEGORIES= mail
MASTER_SITES= http://untroubled.org/ezmlm/archive/${PORTVERSION}/
MAINTAINER= ports@FreeBSD.org
COMMENT= Improved version of the ezmlm mailing list manager
LICENSE= GPLv2
USES= qmail:run
CONFLICTS= ezmlm-0.*
SUB_FILES= pkg-message
MAKE_JOBS_UNSAFE= yes
LEGAL_TEXT= No license -- see http://cr.yp.to/softwarelaw.html
OPTIONS_DEFINE= DB DOCS
OPTIONS_SINGLE= DB
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE
DB_DESC= Enable database extension support
MYSQL_DESC= Build the MySQL extension
PGSQL_DESC= Build the PostgreSQL extension
SQLITE_DESC= Build the SQLite3 extension
.include <bsd.port.options.mk>
ALL_TARGET= it
.if ${PORT_OPTIONS:MMYSQL}
USES+= mysql
EXTRACT_INCLUDE+= -I${LOCALBASE}/include/mysql
EXTRACT_LIB+= -L${LOCALBASE}/lib/mysql -lmysqlclient -lm
ALL_TARGET+= mysql
PLIST_SUB+= MYSQL="" PGSQL="@comment " SQLITE="@comment "
.endif
.if ${PORT_OPTIONS:MPGSQL}
USES+= pgsql
EXTRACT_INCLUDE+= -I${LOCALBASE}/include
EXTRACT_LIB+= -L${LOCALBASE}/lib -lpq -lcrypt
ALL_TARGET+= pgsql
PLIST_SUB+= MYSQL="@comment " PGSQL="" SQLITE="@comment "
.endif
.if ${PORT_OPTIONS:MSQLITE}
USES+= sqlite
EXTRACT_INCLUDE+= -I${LOCALBASE}/include
EXTRACT_LIB+= -L${LOCALBASE}/lib -lsqlite3
ALL_TARGET+= sqlite3
PLIST_SUB+= MYSQL="@comment " PGSQL="@comment " SQLITE=""
.else
PLIST_SUB+= MYSQL="@comment " PGSQL="@comment " SQLITE="@comment "
.endif
CONFIG= ezmlmglrc ezmlmrc ezmlmsubrc
DOCS= BLURB CHANGES ChangeLog DOWNGRADE FAQ HISTORY INSTALL README \
README.mysql README.pgsql README.std TODO UPGRADE
post-patch:
@${ECHO_CMD} "/usr/sbin" > ${WRKSRC}/conf-cron
@${ECHO_CMD} "${PREFIX}/bin" > ${WRKSRC}/conf-bin
@${ECHO_CMD} "${PREFIX}/etc/ezmlm" > ${WRKSRC}/conf-etc
@${ECHO_CMD} "${PREFIX}/lib/ezmlm" > ${WRKSRC}/conf-lib
@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s" > ${WRKSRC}/conf-ld
.if ${PORT_OPTIONS:MMYSQL}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.elif ${PORT_OPTIONS:MPGSQL}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.elif ${PORT_OPTIONS:MSQLITE}
@${ECHO_CMD} "${CC} ${CFLAGS} ${EXTRACT_INCLUDE}" > ${WRKSRC}/conf-cc
@${ECHO_CMD} "${CC} -s ${EXTRACT_LIB}" > ${WRKSRC}/conf-ld
.endif
@${ECHO_CMD} "${MANPREFIX}/man" > ${WRKSRC}/conf-man
@${ECHO_CMD} "${QMAIL_PREFIX}" > ${WRKSRC}/conf-qmail
@${REINPLACE_CMD} -e 's,/etc/ezmlm/,${PREFIX}/etc/ezmlm/,' \
${WRKSRC}/idx.h
@${REINPLACE_CMD} -e "s:\(/installer\) \(\"\`head\):\1 ${STAGEDIR}\2:" \
-e "s:\(\"\`head -n 1 conf-etc\`\"/default\):${STAGEDIR}\1:" \
${WRKSRC}/Makefile
pre-install:
@${REINPLACE_CMD} -e '/\/cat/d' ${WRKSRC}/MAN
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/ezmlm
.for file in ${CONFIG}
@${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/etc/ezmlm/${file}.sample
.endfor
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>
|