1 # $NetBSD: Makefile,v 1.65 2011/12/22 11:06:40 fhajny Exp $
3 DISTNAME
= mailman-2.1
.14-1
4 PKGNAME
= mailman-2.1
.14.1
7 MASTER_SITES
= http
://launchpad.net
/mailman
/2.1/2.1.14/+download
/
10 MAINTAINER
= pkgsrc-users@NetBSD.org
11 HOMEPAGE
= http
://www.list.org
/
12 COMMENT
= The GNU Mailing List Manager
15 PKG_DESTDIR_SUPPORT
= destdir
17 .
include "../../mk/bsd.prefs.mk"
19 PKG_SYSCONFSUBDIR?
= httpd
20 MESSAGE_SUBST
+= PKG_SYSCONFDIR
=${PKG_SYSCONFDIR}
21 MESSAGE_SUBST
+= DOCDIR
=${DOCDIR}
24 GNU_CONFIGURE_PREFIX
= ${EXECDIR}
26 MAKE_FLAGS
+= DIRSETGID
=${TRUE
:Q
}
27 EXECDIR
= ${PREFIX}/lib
/mailman
28 MAILMAN_DATADIR?
= ${VARBASE}/db
/mailman
29 EGDIR
= ${PREFIX}/share
/examples
/mailman
30 DOCDIR
= ${PREFIX}/share
/doc
/mailman
31 MAILMAN_USER?
= mailman
32 MAILMAN_GROUP?
= mailman
33 MAILMAN_CGIGROUP?
= ${APACHE_GROUP}
34 MAILMAN_MAILGROUP?
= daemon
# group sendmail runs under;
35 # use 'nobody' for postfix
38 MESSAGE_SUBST
+= EGDIR
=${EGDIR}
39 MESSAGE_SUBST
+= MAILMAN_USER
=${MAILMAN_USER}
40 PLIST_SUBST
+= PYVERSSUFFIX
=${PYVERSSUFFIX
:Q
}
41 PLIST_SUBST
+= MAILMAN_CGIEXT
=${MAILMAN_CGIEXT
:S
/none
//}
43 PKG_GROUPS_VARS
+= MAILMAN_GROUP MAILMAN_CGIGROUP MAILMAN_MAILGROUP
44 PKG_USERS_VARS
+= MAILMAN_USER
46 PKG_GROUPS
= ${MAILMAN_GROUP}
47 PKG_USERS
= ${MAILMAN_USER}:${MAILMAN_GROUP}
49 PKG_GECOS.
${MAILMAN_USER}= Mailman user
50 PKG_SHELL.
${MAILMAN_USER}= ${SH}
52 REQD_DIRS_PERMS
+= ${EXECDIR} root
${MAILMAN_GROUP} 775
53 OWN_DIRS_PERMS
+= ${MAILMAN_DATADIR} ${MAILMAN_USER} ${MAILMAN_GROUP} 775
54 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/archives
${MAILMAN_USER} ${MAILMAN_GROUP} 775
55 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/archives
/public
${MAILMAN_USER} ${MAILMAN_GROUP} 775
56 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/archives
/private
${MAILMAN_USER} ${MAILMAN_GROUP} 771
57 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/data
${MAILMAN_USER} ${MAILMAN_GROUP} 775
58 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/lists
${MAILMAN_USER} ${MAILMAN_GROUP} 775
59 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/locks
${MAILMAN_USER} ${MAILMAN_GROUP} 775
60 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/logs
${MAILMAN_USER} ${MAILMAN_GROUP} 775
61 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/qfiles
${MAILMAN_USER} ${MAILMAN_GROUP} 775
62 MAKE_DIRS_PERMS
+= ${MAILMAN_DATADIR}/spam
${MAILMAN_USER} ${MAILMAN_GROUP} 775
64 CONF_FILES
+= ${EGDIR}/mailman.conf
${PKG_SYSCONFDIR}/mailman.conf
65 CONF_FILES
+= ${EXECDIR}/Mailman
/mm_cfg.py.
dist ${EXECDIR}/Mailman
/mm_cfg.py
69 INSTALL_TEMPLATES
+= ${FILESDIR}/INSTALL
70 DEINSTALL_TEMPLATES
+= ${FILESDIR}/DEINSTALL
72 PYTHON_PATCH_SCRIPTS
+= Mailman
/Archiver
/pipermail.py
73 PYTHON_PATCH_SCRIPTS
+= Mailman
/Post.py
74 PYTHON_PATCH_SCRIPTS
+= bin
/msgfmt.py
76 CONFIGURE_ARGS
+= --with-cgi-gid
=${MAILMAN_CGIGROUP
:Q
}
77 .if
${MAILMAN_CGIEXT} != "none"
78 CONFIGURE_ARGS
+= --with-cgi-ext
=${MAILMAN_CGIEXT
:Q
}
80 CONFIGURE_ARGS
+= --with-groupname
=${MAILMAN_GROUP
:Q
}
81 CONFIGURE_ARGS
+= --with-mail-gid
=${MAILMAN_MAILGROUP
:Q
}
82 CONFIGURE_ARGS
+= --with-python
=${PYTHONBIN
:Q
}
83 CONFIGURE_ARGS
+= --with-username
=${MAILMAN_USER
:Q
}
84 CONFIGURE_ARGS
+= --with-var-prefix
=${MAILMAN_DATADIR
:Q
}
85 CONFIGURE_ARGS
+= --without-permcheck
87 # Put in externally invalid defaults (MESSAGE directs how to fix it)
88 CONFIGURE_ARGS
+= --with-mailhost
=localhost
89 CONFIGURE_ARGS
+= --with-urlhost
=localhost
91 # dont create egg-info files in pythonlib
92 INSTALL_ENV
+= PKGSRC_PYTHON_NO_EGG
=defined
94 BUILD_DEFS
+= MAILMAN_DATADIR
95 BUILD_DEFS
+= MAILMAN_CGIEXT
98 SUBST_FILES.paths
= ${WRKDIR}/mailman.conf.
dist
99 SUBST_SED.paths
+= -e
's,@EXECDIR@,${EXECDIR},g'
100 SUBST_SED.paths
+= -e
's,@MAILMAN_DATADIR@,${MAILMAN_DATADIR},g'
101 SUBST_STAGE.paths
= post-patch
103 # mailman depends a lot on it and will bitch if changed.
106 REPLACE_PYTHON
+= cron
/senddigests tests
/fblast.py tests
/onebounce.py
109 ${CP} ${FILESDIR}/mailman.conf.
dist ${WRKDIR}/mailman.conf.
dist
112 ${RM} -f
${WRKSRC}/[A-Z
]*.orig
115 ${INSTALL_PROGRAM_DIR} ${DESTDIR}${EXECDIR}
116 ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
117 ${INSTALL_DATA_DIR} ${DESTDIR}${EXECDIR}/support
120 cd
${WRKSRC} && for i in
[A-IN-U
]*; do \
121 ${INSTALL_DATA} $$i ${DESTDIR}${DOCDIR}/; \
123 cd
${WRKSRC}/doc
&& for i in \
124 mailman-
*.ps mailman-
*.pdf mailman-
*.txt
; do \
125 ${INSTALL_DATA} $$i ${DESTDIR}${DOCDIR}/; \
127 ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
128 ${INSTALL_DATA} ${WRKDIR}/mailman.conf.
dist ${DESTDIR}${EGDIR}/mailman.conf
129 ${INSTALL_DATA} ${WRKSRC}/cron
/crontab.in
${DESTDIR}${EGDIR}/crontab.in
130 ${CHMOD} -R g
+w
${DESTDIR}${EXECDIR}
131 ${CHMOD} g
+s
${DESTDIR}${EXECDIR}/cgi-bin
/*
132 ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/lib
/mailman
/bin
${DESTDIR}${PREFIX}/lib
/mailman
/cron
${DESTDIR}${PREFIX}/lib
/mailman
/scripts
134 .
include "../../lang/python/application.mk"
135 .
include "../../mk/bsd.pkg.mk"