summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inputmethod/canna-canuum/MESSAGE11
-rw-r--r--inputmethod/canna-canuum/Makefile40
-rw-r--r--inputmethod/canna-canuum/PLIST3
-rw-r--r--inputmethod/canna-dict/Makefile68
-rw-r--r--inputmethod/canna-dict/PLIST35
-rw-r--r--inputmethod/canna-lib/Makefile22
-rw-r--r--inputmethod/canna-server/Makefile31
-rw-r--r--inputmethod/canna/DESCR2
-rw-r--r--inputmethod/canna/Makefile9
-rw-r--r--inputmethod/canna/Makefile.common27
-rw-r--r--inputmethod/canna/Makefile.include5
-rw-r--r--inputmethod/canna/Makefile.version13
-rw-r--r--inputmethod/canna/files/canna.sh43
13 files changed, 163 insertions, 146 deletions
diff --git a/inputmethod/canna-canuum/MESSAGE b/inputmethod/canna-canuum/MESSAGE
index fdb62555fe3..e2b9b564b21 100644
--- a/inputmethod/canna-canuum/MESSAGE
+++ b/inputmethod/canna-canuum/MESSAGE
@@ -1,8 +1,9 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1 2003/09/23 15:06:58 uebayasi Exp $
+$NetBSD: MESSAGE,v 1.2 2006/07/05 04:48:28 jlam Exp $
+
+You at least should set up key functions in ~/.canna, e.g.:
+
+ (set-key 'alpha-mode "\C-i" 'japanese-mode)
+ (set-key 'empty-mode "\C-i" 'alpha-mode)
-You at least should set up key functions in "${HOME}/.canna".
-such as:
-(set-key 'alpha-mode "\C-i" 'japanese-mode)
-(set-key 'empty-mode "\C-i" 'alpha-mode)
===========================================================================
diff --git a/inputmethod/canna-canuum/Makefile b/inputmethod/canna-canuum/Makefile
index 657d1561a6b..49ed75350fe 100644
--- a/inputmethod/canna-canuum/Makefile
+++ b/inputmethod/canna-canuum/Makefile
@@ -1,43 +1,25 @@
-# $NetBSD: Makefile,v 1.5 2006/01/12 01:57:31 joerg Exp $
-#
-.include "../../inputmethod/canna/Makefile.common"
+# $NetBSD: Makefile,v 1.6 2006/07/05 04:48:28 jlam Exp $
+PKGREVISION= 1
CANNA_MODULE= canuum
+.include "../../inputmethod/canna/Makefile.common"
+
MAINTAINER= oishi@ims.ac.jp
MAKE_ARGS+= PREFIX=${PREFIX}
INSTALLATION_DIRS= man/ja_JP.EUC/man1
+CONFIGURE_DIRS= ${WRKSRC} ${WRKSRC}/canuum
+BUILD_DIRS= ${WRKSRC}/canuum
+
+.include "../../inputmethod/canna-lib/buildlink3.mk"
+
pre-configure:
@${CP} ${PKGSRCDIR}/mk/gnu-config/config.guess ${WRKSRC}/canuum
@${CP} ${PKGSRCDIR}/mk/gnu-config/config.sub ${WRKSRC}/canuum
+ ${LN} -fs ${WRKSRC}/cannaconf.h ${WRKSRC}/canuum
+ ${LN} -fs ${WRKSRC}/canna/ccompat.h ${WRKSRC}/canuum
-do-configure:
- @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF_CMD}; \
- ${MAKE_PROGRAM} ${MAKE_ARGS} Makefile; \
- ${MAKE_PROGRAM} ${MAKE_ARGS} cannaconf.h
- @cd ${WRKSRC}/canuum; ${SETENV} ${MAKE_ENV} ${XMKMF_CMD}; \
- ${MAKE_PROGRAM} ${MAKE_ARGS} Makefile; \
- ${MAKE_PROGRAM} ${MAKE_ARGS} includes
- @${LN} ${WRKSRC}/cannaconf.h ${WRKSRC}/canuum
- @${LN} ${WRKSRC}/canna/ccompat.h ${WRKSRC}/canuum
- @cd ${WRKSRC}/canuum; ${MAKE_PROGRAM} ${MAKE_ARGS} depend
-
-do-build:
- @cd ${WRKSRC}/canuum; ${MAKE_PROGRAM} ${MAKE_ARGS} all
-
-pre-install:
- @${MKDIR} ${WRKSRC}/canuum/misc
-
-do-install:
- @cd ${WRKSRC}/canuum; ${MAKE_PROGRAM} ${MAKE_ARGS} install
-
-post-install:
- @${INSTALL_MAN} ${WRKSRC}/canuum/canuum.jmn \
- ${PREFIX}/man/ja_JP.EUC/man1/canuum.1
-
-.include "../../devel/nbitools/buildlink3.mk"
-.include "../../inputmethod/canna-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/canna-canuum/PLIST b/inputmethod/canna-canuum/PLIST
index f72696e88b1..a7cc875aef9 100644
--- a/inputmethod/canna-canuum/PLIST
+++ b/inputmethod/canna-canuum/PLIST
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2003/09/23 15:06:59 uebayasi Exp $
+@comment $NetBSD: PLIST,v 1.2 2006/07/05 04:48:28 jlam Exp $
bin/canuum
+man/man1/canuum.1
man/ja_JP.EUC/man1/canuum.1
diff --git a/inputmethod/canna-dict/Makefile b/inputmethod/canna-dict/Makefile
index 313452e7490..82bfb0d37d4 100644
--- a/inputmethod/canna-dict/Makefile
+++ b/inputmethod/canna-dict/Makefile
@@ -1,38 +1,66 @@
-# $NetBSD: Makefile,v 1.9 2005/12/05 20:50:23 rillig Exp $
-#
-.include "../../inputmethod/canna/Makefile.common"
+# $NetBSD: Makefile,v 1.10 2006/07/05 04:48:28 jlam Exp $
+PKGREVISION= 1
CANNA_MODULE= dict
-BUILD_DEPENDS+= Canna-server>=${CANNA_VERSION}:../../inputmethod/canna-server
+.include "../../inputmethod/canna/Makefile.common"
-NO_MTREE= yes
-OWN_DIRS= ${PREFIX}/canna
+BUILD_DEPENDS+= Canna-server>=${CANNA_VERSION}:../../inputmethod/canna-server
EVAL_PREFIX+= CANNASERVERBINDIR=Canna-server
.for cmd in MERGE FORCPP FORSORT SPLITWORD MERGEWORD CRXGRAM CRXDIC CRFREQ KPDIC
-CANNA_CMD_SED_SCRIPT+=-e 's|\(${cmd} = \).*/\(.*\)|\1${CANNASERVERBINDIR}/bin/\2|'
+CANNA_CMD_SED_SCRIPT+= \
+ -e 's|\(${cmd} = \).*/\(.*\)|\1${CANNASERVERBINDIR}/bin/\2|'
.endfor
+CONFIGURE_DIRS= ${DICT_WRKSRC}
+DICT_WRKSRC= ${WRKSRC}/dic/ideo
+CANNA_DICTDIR= ${PREFIX}/libdata/canna
+
+PKG_GROUPS= ${CANNA_GROUP}
+PKG_USERS= ${CANNA_USER}:${CANNA_GROUP}
+
+INSTALL_DICT_DIR= \
+ ${INSTALL} -d -o ${CANNA_USER} -g ${CANNA_GROUP} -m 0775
+INSTALL_DICT= \
+ ${INSTALL} ${COPY} -o ${CANNA_USER} -g ${CANNA_GROUP} -m 0664
+
post-patch:
@${MV} ${WRKSRC}/Canna.conf ${WRKSRC}/Canna.conf.orig
- @${SED} -e 's|\(DicDir.*=\).*|\1${IMDICTDIR}/canna|' \
+ @${SED} -e 's|\(DicDir.*=\).*|\1${IMDICTDIR}/canna|' \
${WRKSRC}/Canna.conf.orig > ${WRKSRC}/Canna.conf
@for file in `${FIND} ${WRKSRC}/dic/ideo -name Imakefile -print`; do \
- ${MV} $$file $$file.orig; \
+ ${MV} $$file $$file.orig; \
${SED} ${CANNA_CMD_SED_SCRIPT} $$file.orig > $$file; \
- done
-
-do-configure:
- @cd ${WRKSRC}/dic/ideo; ${XMKMF}
-
-do-build:
- @cd ${WRKSRC}/dic/ideo; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM}
+ done
do-install:
- @cd ${WRKSRC}/dic/ideo; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} install
+ ${INSTALL_DICT_DIR} ${CANNA_DICTDIR}
+ ${INSTALL_DICT} ${DICT_WRKSRC}/grammar/fuzokugo.cbd ${CANNA_DICTDIR}
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/bushu.cld ${CANNA_DICTDIR}
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/dics.dir ${CANNA_DICTDIR}
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/iroha.cbd ${CANNA_DICTDIR}
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/iroha.cld ${CANNA_DICTDIR}
-.include "../../inputmethod/canna/Makefile.include"
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/chimei.t \
+ ${CANNA_DICTDIR}/chimei.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/hojomwd.t \
+ ${CANNA_DICTDIR}/hojomwd.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/hojoswd.t \
+ ${CANNA_DICTDIR}/hojoswd.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/kanasmpl.t \
+ ${CANNA_DICTDIR}/kanasmpl.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/katakana.t \
+ ${CANNA_DICTDIR}/katakana.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/keishiki.t \
+ ${CANNA_DICTDIR}/keishiki.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/necgaiji.t \
+ ${CANNA_DICTDIR}/necgaiji.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/number.t \
+ ${CANNA_DICTDIR}/number.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/software.t \
+ ${CANNA_DICTDIR}/software.ctd
+ ${INSTALL_DICT} ${DICT_WRKSRC}/words/suffix.t \
+ ${CANNA_DICTDIR}/suffix.ctd
-# Need to set this here _after_ bsd.pkg.mk
-PREFIX= ${IMDICTDIR}
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/canna-dict/PLIST b/inputmethod/canna-dict/PLIST
index 71b879d3390..a1e4f635c4a 100644
--- a/inputmethod/canna-dict/PLIST
+++ b/inputmethod/canna-dict/PLIST
@@ -1,18 +1,17 @@
-@comment $NetBSD: PLIST,v 1.2 2003/09/23 15:06:59 uebayasi Exp $
-canna/canna/bushu.cld
-canna/canna/chimei.ctd
-canna/canna/dics.dir
-canna/canna/fuzokugo.cbd
-canna/canna/hojomwd.ctd
-canna/canna/hojoswd.ctd
-canna/canna/iroha.cbd
-canna/canna/iroha.cld
-canna/canna/kanasmpl.ctd
-canna/canna/katakana.ctd
-canna/canna/keishiki.ctd
-canna/canna/necgaiji.ctd
-canna/canna/number.ctd
-canna/canna/software.ctd
-canna/canna/suffix.ctd
-@dirrm canna/canna
-@dirrm canna
+@comment $NetBSD: PLIST,v 1.3 2006/07/05 04:48:28 jlam Exp $
+libdata/canna/bushu.cld
+libdata/canna/chimei.ctd
+libdata/canna/dics.dir
+libdata/canna/fuzokugo.cbd
+libdata/canna/hojomwd.ctd
+libdata/canna/hojoswd.ctd
+libdata/canna/iroha.cbd
+libdata/canna/iroha.cld
+libdata/canna/kanasmpl.ctd
+libdata/canna/katakana.ctd
+libdata/canna/keishiki.ctd
+libdata/canna/necgaiji.ctd
+libdata/canna/number.ctd
+libdata/canna/software.ctd
+libdata/canna/suffix.ctd
+@dirrm libdata/canna
diff --git a/inputmethod/canna-lib/Makefile b/inputmethod/canna-lib/Makefile
index c722a3e8b6b..979906adbc7 100644
--- a/inputmethod/canna-lib/Makefile
+++ b/inputmethod/canna-lib/Makefile
@@ -1,13 +1,13 @@
-# $NetBSD: Makefile,v 1.8 2005/12/29 15:33:45 joerg Exp $
-#
-.include "../../inputmethod/canna/Makefile.common"
+# $NetBSD: Makefile,v 1.9 2006/07/05 04:48:28 jlam Exp $
+PKGREVISION= 1
CANNA_MODULE= lib
-INSTALL_TARGET= install install.man
+.include "../../inputmethod/canna/Makefile.common"
# (1) Change SUBDIRS.
# (2) Don't install `forcpp', `kpdic'.
+#
post-patch:
@${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig
@${SED} -e 's|\(SUBDIRS = lib canna\).*\( misc\)|\1 cmd/forcpp cmd/kpdic dic/phono\2|' \
@@ -19,22 +19,20 @@ post-patch:
> ${WRKSRC}/cmd/${f}/Imakefile
.endfor
-# We need to pass ${MAKE_ENV} to ${XMKMF}
-do-configure:
- @cd ${WRKSRC} && \
- ${SETENV} ${SCRIPTS_ENV} ${MAKE_ENV} ${XMKMF}
-
post-configure:
@${LN} -s ${WRKSRC}/server/*.h ${WRKSRC}/include
.include "../../mk/bsd.prefs.mk"
+# XXX Work around bug in nbitools where the correct DragonFly library
+# XXX symlinks are not created.
+# XXX
.if ${OPSYS} == "DragonFly"
post-install:
-.for f in RKC RKC16 canna canna16
+. for f in RKC RKC16 canna canna16
${LN} -s lib${f}.so.1.1 ${PREFIX}/lib/lib${f}.so.1
${LN} -s lib${f}.so.1 ${PREFIX}/lib/lib${f}.so
-.endfor
+. endfor
.endif
-.include "../../inputmethod/canna/Makefile.include"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/canna-server/Makefile b/inputmethod/canna-server/Makefile
index 32dd7b6fa0d..e1480f6d4cc 100644
--- a/inputmethod/canna-server/Makefile
+++ b/inputmethod/canna-server/Makefile
@@ -1,26 +1,29 @@
-# $NetBSD: Makefile,v 1.16 2006/04/23 00:12:37 jlam Exp $
-#
-.include "../../inputmethod/canna/Makefile.common"
-
-PKGREVISION= 1
+# $NetBSD: Makefile,v 1.17 2006/07/05 04:48:28 jlam Exp $
+PKGREVISION= 2
CANNA_MODULE= server
-INSTALL_TARGET= instserver
+.include "../../inputmethod/canna/Makefile.common"
-.include "../../mk/bsd.prefs.mk"
+INSTALL_TARGET= instserver
BUILD_DEFS+= CANNA_USER CANNA_GROUP
-MESSAGE_SUBST+= CANNA_USER="${CANNA_USER}"
-MESSAGE_SUBST+= CANNA_GROUP="${CANNA_GROUP}"
+MESSAGE_SUBST+= CANNA_USER=${CANNA_USER}
+MESSAGE_SUBST+= CANNA_GROUP=${CANNA_GROUP}
PKG_GROUPS= ${CANNA_GROUP}
PKG_USERS= ${CANNA_USER}:${CANNA_GROUP}
-OWN_DIRS_PERMS= ${CANNA_SPOOL} ${CANNA_USER} ${CANNA_GROUP} ${CANNA_MODE}
+MAKE_DIRS+= ${IMDICTDIR}
+OWN_DIRS+= ${IMDICTDIR}/canna
+OWN_DIRS+= ${IMDICTDIR}/canna/canna
+OWN_DIRS_PERMS+= ${CANNA_SPOOL} \
+ ${CANNA_USER} ${CANNA_GROUP} ${CANNA_MODE}
RCD_SCRIPTS= canna
+.include "../../inputmethod/canna-lib/buildlink3.mk"
+
post-patch:
${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig
${SED} -e 's|\(SUBDIRS = \).*|\1 canna lib server cmd doc|' \
@@ -30,10 +33,4 @@ post-patch:
${SED} -e 's|\(DicDir.*=\).*|\1${IMDICTDIR}/canna|' \
${WRKSRC}/Canna.conf.orig > ${WRKSRC}/Canna.conf
-do-configure:
- @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF}
-
-.include "../../devel/nbitools/buildlink3.mk"
-.include "../../inputmethod/canna-lib/buildlink3.mk"
-
-.include "../../inputmethod/canna/Makefile.include"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/canna/DESCR b/inputmethod/canna/DESCR
index 1696ceaa8de..69ed535d0b8 100644
--- a/inputmethod/canna/DESCR
+++ b/inputmethod/canna/DESCR
@@ -1,3 +1,3 @@
-Canna is a Japanese input method server / client. Canna supports
+Canna is a Japanese input method server/client. Canna supports
Emacs/Mule (Multi-lingual extension Emacs), kinput2 X11 input methods,
cannum front end, and some others.
diff --git a/inputmethod/canna/Makefile b/inputmethod/canna/Makefile
index f809d8949a5..2a0824acb85 100644
--- a/inputmethod/canna/Makefile
+++ b/inputmethod/canna/Makefile
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.5 2005/07/19 10:17:17 grant Exp $
-#
+# $NetBSD: Makefile,v 1.6 2006/07/05 04:48:28 jlam Exp $
+
.include "Makefile.common"
PKGNAME:= Canna-${CANNA_VERSION}
+PKGREVISION= 1
-DEPENDS+= Canna-server>=${CANNA_VERSION}:../../inputmethod/canna-server
-DEPENDS+= Canna-dict>=${CANNA_VERSION}:../../inputmethod/canna-dict
+DEPENDS+= Canna-server>=${CANNA_VERSION}nb2:../../inputmethod/canna-server
+DEPENDS+= Canna-dict>=${CANNA_VERSION}nb1:../../inputmethod/canna-dict
EXTRACT_ONLY= # empty
NO_CHECKSUM= YES
diff --git a/inputmethod/canna/Makefile.common b/inputmethod/canna/Makefile.common
index 2fb65782378..562d0f2a8d7 100644
--- a/inputmethod/canna/Makefile.common
+++ b/inputmethod/canna/Makefile.common
@@ -1,8 +1,11 @@
-# $NetBSD: Makefile.common,v 1.15 2006/01/21 12:01:49 rxg Exp $
+# $NetBSD: Makefile.common,v 1.16 2006/07/05 04:48:28 jlam Exp $
#
# Canna common makefile.
#
+# "Pkgsrc" version.
+CANNA_VERSION= 3.6pl4
+
DISTNAME= Canna${CANNA_VERSION:S|.||:S|pl|p|}
PKGNAME= Canna-${CANNA_MODULE}-${CANNA_VERSION}
CATEGORIES= japanese inputmethod
@@ -12,14 +15,13 @@ MAINTAINER= tech-pkg-ja@jp.NetBSD.org
HOMEPAGE= http://canna.sourceforge.jp/
COMMENT= Kana-Kanji conversion system (${CANNA_MODULE})
-FILESDIR= ${.CURDIR}/../canna/files
-DISTINFO_FILE= ${.CURDIR}/../canna/distinfo
-PATCHDIR= ${.CURDIR}/../canna/patches
-
-.include "../../inputmethod/canna/Makefile.version"
+FILESDIR= ${.CURDIR}/../../inputmethod/canna/files
+DISTINFO_FILE= ${.CURDIR}/../../inputmethod/canna/distinfo
+PATCHDIR= ${.CURDIR}/../../inputmethod/canna/patches
-USE_TOOLS+= imake
-CANNA_SPOOL= ${DESTDIR}/var/spool/canna
+USE_TOOLS+= itools
+USE_IMAKE= yes
+CANNA_SPOOL= ${VARBASE}/spool/canna
CANNA_MODE= 0755
# XXX IPv6 support. To be done.
@@ -31,3 +33,12 @@ CANNA_MODE= 0755
#INET6= # empty
#.endif
#MAKE_ENV+= INET6=${INET6}
+
+CANNA_ENV= CANNA_USER=${CANNA_USER} \
+ CANNA_GROUP=${CANNA_GROUP} \
+ CANNA_SPOOL=${CANNA_SPOOL} \
+ CANNA_MODE=${CANNA_MODE} \
+ IMDICTDIR=${IMDICTDIR}
+MAKE_ENV+= ${CANNA_ENV}
+PLIST_SUBST+= ${CANNA_ENV}
+FILES_SUBST+= ${CANNA_ENV}
diff --git a/inputmethod/canna/Makefile.include b/inputmethod/canna/Makefile.include
deleted file mode 100644
index c039eccab9f..00000000000
--- a/inputmethod/canna/Makefile.include
+++ /dev/null
@@ -1,5 +0,0 @@
-# $NetBSD: Makefile.include,v 1.2 2004/03/05 19:09:22 minskim Exp $
-#
-
-.include "../../devel/nbitools/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/canna/Makefile.version b/inputmethod/canna/Makefile.version
deleted file mode 100644
index b6fda755379..00000000000
--- a/inputmethod/canna/Makefile.version
+++ /dev/null
@@ -1,13 +0,0 @@
-# $NetBSD: Makefile.version,v 1.2 2003/09/23 15:06:57 uebayasi Exp $
-
-# "Pkgsrc" version.
-CANNA_VERSION= 3.6pl4
-
-_CANNA_VERS= \
- CANNA_USER=${CANNA_USER} \
- CANNA_GROUP=${CANNA_GROUP} \
- CANNA_SPOOL=${CANNA_SPOOL} \
- CANNA_MODE=${CANNA_MODE} \
- IMDICTDIR=${IMDICTDIR}
-MAKE_ENV+= ${_CANNA_VERS}
-PLIST_SUBST+= ${_CANNA_VERS}
diff --git a/inputmethod/canna/files/canna.sh b/inputmethod/canna/files/canna.sh
index 72d19e74a7f..346bccac021 100644
--- a/inputmethod/canna/files/canna.sh
+++ b/inputmethod/canna/files/canna.sh
@@ -1,25 +1,42 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: canna.sh,v 1.1 2003/07/29 19:42:53 jmmv Exp $
+# $NetBSD: canna.sh,v 1.2 2006/07/05 04:48:28 jlam Exp $
#
# PROVIDE: canna
# REQUIRE: DAEMON
-if [ -f /etc/rc.subr ]
-then
- . /etc/rc.subr
-fi
+. /etc/rc.subr
name="canna"
rcvar=$name
command="@PREFIX@/sbin/cannaserver"
+start_precmd="canna_prestart"
stop_cmd="@PREFIX@/sbin/cannakill"
-if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
-then
- load_rc_config $name
- run_rc_command "$1"
-else
- @ECHO@ -n ' ${name}'
- ${command} ${canna_flags} ${command_args}
-fi
+mkdir_perms() {
+ dir="$1"; user="$2"; group="$3"; mode="$4"
+ @TEST@ -d $dir || @MKDIR@ $dir
+ @CHOWN@ $user $dir
+ @CHGRP@ $group $dir
+ @CHMOD@ $mode $dir
+}
+
+canna_prestart()
+{
+ mkdir_perms @CANNA_SPOOL@ @CANNA_USER@ @CANNA_GROUP@ 0755
+ mkdir_perms @IMDICTDIR@/canna @CANNA_USER@ @CANNA_GROUP@ 0775
+ mkdir_perms @IMDICTDIR@/canna/canna @CANNA_USER@ @CANNA_GROUP@ 0775
+
+ srcdictdir="@PREFIX@/libdata/canna"
+ dictdir="@IMDICTDIR@/canna/canna"
+ if @TEST@ -d $srcdictdir; then
+ ( cd $srcdictdir; for f in *; do
+ @TEST@ "$f" != "*" || continue
+ @RM@ -f $dictdir/$f
+ @LN@ -fs $srcdictdir/$f $dictdir/$f
+ done )
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"