pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mailman3: add rcd and config files
Module Name: pkgsrc-wip
Committed By: Mark Davies <mark%ecs.vuw.ac.nz@localhost>
Pushed By: markd
Date: Tue May 30 22:31:20 2023 +1200
Changeset: 086a847dfb018112d97e88e8372d1caab6f22325
Modified Files:
mailman3/Makefile
mailman3/PLIST
Added Files:
mailman3/files/mailman.cfg
mailman3/files/mailman3.sh
Log Message:
mailman3: add rcd and config files
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=086a847dfb018112d97e88e8372d1caab6f22325
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mailman3/Makefile | 14 ++++++++++++
mailman3/PLIST | 1 +
mailman3/files/mailman.cfg | 3 +++
mailman3/files/mailman3.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 74 insertions(+)
diffs:
diff --git a/mailman3/Makefile b/mailman3/Makefile
index 6caddfff3d..9d1e9713df 100644
--- a/mailman3/Makefile
+++ b/mailman3/Makefile
@@ -63,10 +63,24 @@ PKG_USERS= ${MAILMAN_USER}:${MAILMAN_GROUP}
PKG_GECOS.${MAILMAN_USER}= Mailman user
PKG_SHELL.${MAILMAN_USER}= ${SH}
+FILES_SUBST+= MAILMAN_USER=${MAILMAN_USER}
+FILES_SUBST+= MAILMAN_GROUP=${MAILMAN_GROUP}
+
+RCD_SCRIPTS= mailman3
+
OWN_DIRS_PERMS+= ${VARBASE}/lib/mailman ${MAILMAN_USER} ${MAILMAN_GROUP} 770
OWN_DIRS_PERMS+= ${VARBASE}/log/mailman ${MAILMAN_USER} ${MAILMAN_GROUP} 770
OWN_DIRS_PERMS+= ${VARBASE}/spool/mailman ${MAILMAN_USER} ${MAILMAN_GROUP} 775
OWN_DIRS_PERMS+= ${VARBASE}/spool/lock/mailman ${MAILMAN_USER} ${MAILMAN_GROUP} 775
+EGDIR= share/examples/mailman3
+CONF_FILES_PERMS= ${EGDIR}/mailman.cfg ${PKG_SYSCONFDIR}/mailman.cfg \
+ ${REAL_ROOT_USER} ${MAILMAN_GROUP} 0640
+
+INSTALLATION_DIRS+= ${EGDIR}
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/mailman.cfg ${DESTDIR}${PREFIX}/${EGDIR}/mailman.cfg
+
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mailman3/PLIST b/mailman3/PLIST
index 645e42c82a..fa61cba54e 100644
--- a/mailman3/PLIST
+++ b/mailman3/PLIST
@@ -2224,3 +2224,4 @@ ${PYSITELIB}/mailman/utilities/uid.pyo
${PYSITELIB}/mailman/version.py
${PYSITELIB}/mailman/version.pyc
${PYSITELIB}/mailman/version.pyo
+share/examples/mailman3/mailman.cfg
diff --git a/mailman3/files/mailman.cfg b/mailman3/files/mailman.cfg
new file mode 100644
index 0000000000..44229a479f
--- /dev/null
+++ b/mailman3/files/mailman.cfg
@@ -0,0 +1,3 @@
+[mailman]
+
+layout: fhs
diff --git a/mailman3/files/mailman3.sh b/mailman3/files/mailman3.sh
new file mode 100644
index 0000000000..1dfe47599f
--- /dev/null
+++ b/mailman3/files/mailman3.sh
@@ -0,0 +1,56 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: mailman3
+# REQUIRE: mail
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="mailman3"
+rcvar=$name
+command="@PREFIX@/bin/mailman"
+#command_args="-C ${mailman_config}"
+start_cmd="mailman_doit start"
+stop_cmd="mailman_doit stop"
+restart_cmd="mailman_doit restart"
+status_cmd="mailman_doit status"
+info_cmd="mailman_doit info"
+extra_commands=info
+start_precmd=mailman_prestart
+
+mailman_prestart() {
+ dir="@VARBASE@/run/mailman"
+ if @TEST@ ! -d $dir; then
+ @MKDIR@ -p $dir
+ @CHMOD@ 0755 $dir
+ @CHOWN@ @MAILMAN_USER@:@MAILMAN_GROUP@ $dir
+ fi
+}
+
+#required_files="%%PREFIX%%/${name}/etc/${name}.cfg"
+#pidfile="%%PREFIX%%/${name}/master.pid"
+
+#command_args="-C ${mailman_config}"
+
+mailman_doit()
+{
+ LANG=en_US.UTF-8 @SU@ -m @MAILMAN_USER@ -c "${command} ${command_args} ${rc_arg}"
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ mailman_doit "$1"
+fi
+
+
+#: ${mailman_enable:=NO}
+#: ${mailman_config="%%PREFIX%%/mailman/etc/mailman.cfg"}
+
+
Home |
Main Index |
Thread Index |
Old Index