blob: 65de1a1fdff3b8310f8fd9d0fd7f5927cbce1454 (
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
|
# $NetBSD: Makefile,v 1.19 2005/02/14 16:56:38 tv Exp $
DISTNAME= mailman-2.1.4
PKGREVISION= 3
CATEGORIES= mail www
MASTER_SITES= http://www.list.org/ \
${MASTER_SITE_GNU:=mailman/}
EXTRACT_SUFX= .tgz
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://www.list.org/
COMMENT= The GNU Mailing List Manager
.include "../../mk/bsd.prefs.mk"
USE_PKGINSTALL= yes
PKG_SYSCONFSUBDIR?= httpd
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+= DOCDIR=${DOCDIR}
GNU_CONFIGURE= yes
GNU_CONFIGURE_PREFIX= ${EXECDIR}
MAKE_FLAGS+= DIRSETGID=${TRUE}
EXECDIR= ${PREFIX}/lib/mailman
MAILMAN_DATADIR?= ${VARBASE}/db/mailman
EGDIR= ${PREFIX}/share/examples/mailman
DOCDIR= ${PREFIX}/share/doc/mailman
MAILMAN_USER?= mailman
MAILMAN_GROUP?= mailman
MAILMAN_CGIGROUP?= ${APACHE_GROUP}
MAILMAN_MAILGROUP?= guest # group of user 'daemon'
MAILMAN_CGIEXT?= .cgi
MESSAGE_SUBST+= EXECDIR=${EXECDIR}
FILES_SUBST+= EXECDIR=${EXECDIR}
FILES_SUBST+= MAILMAN_USER=${MAILMAN_USER}
FILES_SUBST+= MAILMAN_GROUP=${MAILMAN_GROUP}
FILES_SUBST+= MAILMAN_DATADIR=${MAILMAN_DATADIR}
PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
PLIST_SUBST+= MAILMAN_CGIEXT=${MAILMAN_CGIEXT:S/none//}
PKG_GROUPS= ${MAILMAN_GROUP}
PKG_USERS= ${MAILMAN_USER}:${MAILMAN_GROUP}::Mailman\\ user::${SH}
OWN_DIRS_PERMS+= ${EXECDIR} root ${MAILMAN_GROUP} 775
OWN_DIRS_PERMS+= ${MAILMAN_DATADIR} ${MAILMAN_USER} ${MAILMAN_GROUP} 755
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/archives ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/archives/public ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/archives/private ${MAILMAN_USER} ${MAILMAN_GROUP} 771
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/data ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/lists ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/locks ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/logs ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/qfiles ${MAILMAN_USER} ${MAILMAN_GROUP} 775
MAKE_DIRS_PERMS+= ${MAILMAN_DATADIR}/spam ${MAILMAN_USER} ${MAILMAN_GROUP} 775
CONF_FILES+= ${EGDIR}/mailman.conf ${PKG_SYSCONFDIR}/mailman.conf
CONF_FILES+= ${EXECDIR}/Mailman/mm_cfg.py.dist ${EXECDIR}/Mailman/mm_cfg.py
RCD_SCRIPTS= mailman
INSTALL_EXTRA_TMPL+= ${FILESDIR}/INSTALL
DEINSTALL_EXTRA_TMPL+= ${FILESDIR}/DEINSTALL
PYTHON_VERSIONS_ACCEPTED= 24 23 22 21
PYTHON_PATCH_SCRIPTS+= Mailman/Archiver/pipermail.py
PYTHON_PATCH_SCRIPTS+= Mailman/Post.py
PYTHON_PATCH_SCRIPTS+= admin/bin/Release.py
PYTHON_PATCH_SCRIPTS+= admin/bin/faq2ht.py
PYTHON_PATCH_SCRIPTS+= admin/bin/mm2do
PYTHON_PATCH_SCRIPTS+= bin/msgfmt.py
CONFIGURE_ARGS+= --with-cgi-gid=${MAILMAN_CGIGROUP}
.if ${MAILMAN_CGIEXT} != "none"
CONFIGURE_ARGS+= --with-cgi-ext=${MAILMAN_CGIEXT}
.endif
CONFIGURE_ARGS+= --with-groupname=${MAILMAN_GROUP}
CONFIGURE_ARGS+= --with-mail-gid=${MAILMAN_MAILGROUP}
CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
CONFIGURE_ARGS+= --with-username=${MAILMAN_USER}
CONFIGURE_ARGS+= --with-var-prefix=${MAILMAN_DATADIR}
CONFIGURE_ARGS+= --without-permcheck
# Put in externally invalid defaults (MESSAGE directs how to fix it)
CONFIGURE_ARGS+= --with-mailhost=localhost
CONFIGURE_ARGS+= --with-urlhost=localhost
BUILD_DEFS+= MAILMAN_DATADIR
BUILD_DEFS+= MAILMAN_USER
BUILD_DEFS+= MAILMAN_GROUP
BUILD_DEFS+= MAILMAN_CGIGROUP
BUILD_DEFS+= MAILMAN_MAILGROUP
BUILD_DEFS+= MAILMAN_CGIEXT
post-patch:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mailman.conf.dist \
>${WRKDIR}/mailman.conf.dist
${RM} -f ${WRKSRC}/[A-Z]*.orig
pre-install:
${INSTALL} -d -o ${MAILMAN_USER} -g ${MAILMAN_GROUP} -m 775 ${EXECDIR}
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA_DIR} ${EXECDIR}/support
post-install:
cd ${WRKSRC} && for i in [A-IN-U]*; do \
${INSTALL_DATA} $$i ${DOCDIR}/; \
done
${INSTALL_DATA_DIR} ${EGDIR}
${INSTALL_DATA} ${WRKDIR}/mailman.conf.dist ${EGDIR}/mailman.conf
${CHOWN} -R root:${MAILMAN_GROUP} ${EXECDIR}
${CHMOD} -R g+w ${EXECDIR}
${CHMOD} g+s ${EXECDIR}/cgi-bin/*
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
|