summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inputmethod/canna-server-bin/MESSAGE8
-rw-r--r--inputmethod/canna-server-bin/Makefile13
-rw-r--r--inputmethod/canna/Makefile.common4
-rw-r--r--mk/bsd.pkg.defaults.mk12
4 files changed, 27 insertions, 10 deletions
diff --git a/inputmethod/canna-server-bin/MESSAGE b/inputmethod/canna-server-bin/MESSAGE
index f1a3705d90a..adeb69fe59f 100644
--- a/inputmethod/canna-server-bin/MESSAGE
+++ b/inputmethod/canna-server-bin/MESSAGE
@@ -1,16 +1,16 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1 2003/06/09 09:36:35 uebayasi Exp $
+$NetBSD: MESSAGE,v 1.2 2003/07/29 19:53:20 jmmv Exp $
If you want Canna server to boot automatically,
1) Copy ${PREFIX}/etc/rc.d/canna to /etc/rc.d/.
2) Add the following line to /etc/rc.conf.
- canna=YES canna_flags="-u daemon"
+ canna=YES canna_flags="-u ${CANNA_USER}"
-canna_flags="-u daemon" is not required, but recommended. Note that our
+canna_flags="-u ${CANNA_USER}" is not required, but recommended. Note that our
Canna package no longer uses setuid(2) to make the server run as user
-"daemon", owing to the implementation of "-u" option (3.6 and above). See
+"${CANNA_USER}", owing to the implementation of "-u" option (3.6 and above). See
cannaserver(1M).
Also note that by default cannaserver(1M) no longer allows connections
diff --git a/inputmethod/canna-server-bin/Makefile b/inputmethod/canna-server-bin/Makefile
index 33f2955e9f4..2fa0840e195 100644
--- a/inputmethod/canna-server-bin/Makefile
+++ b/inputmethod/canna-server-bin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2003/07/29 19:42:54 jmmv Exp $
+# $NetBSD: Makefile,v 1.7 2003/07/29 19:53:20 jmmv Exp $
#
.include "../canna/Makefile.common"
@@ -10,7 +10,16 @@ USE_BUILDLINK2= # defined
USE_PKGINSTALL= YES
INSTALL_TARGET= instserver
-OWN_DIRS_PERMS= ${CANNA_SPOOL} ${CANNA_OWNER} ${CANNA_GROUP} ${CANNA_MODE}
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= CANNA_USER CANNA_GROUP
+MESSAGE_SUBST+= CANNA_USER="${CANNA_USER}"
+MESSAGE_SUBST+= CANNA_GROUP="${CANNA_GROUP}"
+
+PKG_GROUPS= ${CANNA_GROUP}
+PKG_USERS= ${CANNA_USER}:${CANNA_GROUP}::Canna\\ user
+
+OWN_DIRS_PERMS= ${CANNA_SPOOL} ${CANNA_USER} ${CANNA_GROUP} ${CANNA_MODE}
RCD_SCRIPTS= canna
diff --git a/inputmethod/canna/Makefile.common b/inputmethod/canna/Makefile.common
index 287e2b3bb2b..b1e845917fa 100644
--- a/inputmethod/canna/Makefile.common
+++ b/inputmethod/canna/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.3 2003/07/17 21:43:34 grant Exp $
+# $NetBSD: Makefile.common,v 1.4 2003/07/29 19:53:19 jmmv Exp $
#
# Canna common makefile.
#
@@ -22,8 +22,6 @@ PATCHDIR= ${.CURDIR}/../canna/patches
# "Pkgsrc" version.
CANNA_VERSION= 3.6pl3
-CANNA_OWNER?= daemon
-CANNA_GROUP?= daemon
CANNA_SPOOL= ${DESTDIR}/var/spool/canna
CANNA_MODE= 0755
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk
index 6444ead0dba..19400f1a132 100644
--- a/mk/bsd.pkg.defaults.mk
+++ b/mk/bsd.pkg.defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.164 2003/07/29 17:24:49 jmmv Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.165 2003/07/29 19:53:19 jmmv Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -603,6 +603,16 @@ ATERM_USE_GREEK?= NO
# Possible: category/pkg
# Default: not defined
+CANNA_GROUP?= daemon
+# Used in the canna-server-bin package to specify the server group.
+# Possible: any group name
+# Default: daemon
+
+CANNA_USER?= daemon
+# Used in the canna-server-bin package to specify the server user.
+# Possible: any user name
+# Default: daemon
+
#CDRECORD_CONF= ${PKG_SYSCONFDIR}/cdrecord.conf
# The location of the cdrtools/cdrecord configuration file. The
# sysutils/cdrecord pkg issues a warning if the cdrtools default of