aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2008-11-01 14:45:16 +0000
committerHiroki Sato <hrs@FreeBSD.org>2008-11-01 14:45:16 +0000
commitdac2da7f40d31b1f449654988f940900b3fdd0b2 (patch)
treec12f543b8803377dd6cfd7633003505bf2fac0d5
parent8db24c7a9abe66162bd344459d4ae88b16d23d5c (diff)
downloadports-dac2da7f40d31b1f449654988f940900b3fdd0b2.tar.gz
ports-dac2da7f40d31b1f449654988f940900b3fdd0b2.zip
- Add "listenaddr 127.0.0.1" to {c|t|k}serverc.
- Update startup scripts. - Simplify the pkg-install script.
Notes
Notes: svn path=/head/; revision=222275
-rw-r--r--chinese/FreeWnn-server/pkg-plist2
-rw-r--r--japanese/FreeWnn-lib/Makefile2
-rw-r--r--japanese/FreeWnn-lib/files/patch-cWnn-cd-cserverrc11
-rw-r--r--japanese/FreeWnn-lib/files/patch-cWnn-td-tserverrc11
-rw-r--r--japanese/FreeWnn-lib/files/patch-kWnn-kd-kserverrc11
-rw-r--r--japanese/FreeWnn-server/Makefile9
-rw-r--r--japanese/FreeWnn-server/files/cwnn.sh.in27
-rw-r--r--japanese/FreeWnn-server/files/kwnn.sh.in27
-rw-r--r--japanese/FreeWnn-server/files/pkg-install.in203
-rw-r--r--japanese/FreeWnn-server/files/twnn.sh.in27
-rw-r--r--japanese/FreeWnn-server/files/wnn.sh.in28
-rw-r--r--japanese/FreeWnn-server/pkg-plist1
-rw-r--r--korean/FreeWnn-server/pkg-plist1
13 files changed, 186 insertions, 174 deletions
diff --git a/chinese/FreeWnn-server/pkg-plist b/chinese/FreeWnn-server/pkg-plist
index d4c002f81b2e..9fe05c5f9dbf 100644
--- a/chinese/FreeWnn-server/pkg-plist
+++ b/chinese/FreeWnn-server/pkg-plist
@@ -10,8 +10,6 @@ bin/cWnn4/cwnnstat
bin/cWnn4/cwnntouch
bin/cWnn4/tserver
@dirrm bin/cWnn4
-etc/rc.d/cwnn.sh
-etc/rc.d/twnn.sh
lib/wnn/zh_CN/dic/sys/QianMa.dic
lib/wnn/zh_CN/dic/sys/WuBi.dic
lib/wnn/zh_CN/dic/sys/basic.dic
diff --git a/japanese/FreeWnn-lib/Makefile b/japanese/FreeWnn-lib/Makefile
index 7532f4f146c9..f81b5296710a 100644
--- a/japanese/FreeWnn-lib/Makefile
+++ b/japanese/FreeWnn-lib/Makefile
@@ -7,7 +7,7 @@
PORTNAME= FreeWnn
PORTVERSION= 1.1.1.a021
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES?= japanese
MASTER_SITES= ftp://ftp.freewnn.org/pub/%SUBDIR%/ \
${MASTER_SITE_SOURCEFORGE_JP}
diff --git a/japanese/FreeWnn-lib/files/patch-cWnn-cd-cserverrc b/japanese/FreeWnn-lib/files/patch-cWnn-cd-cserverrc
new file mode 100644
index 000000000000..8097df8739cd
--- /dev/null
+++ b/japanese/FreeWnn-lib/files/patch-cWnn-cd-cserverrc
@@ -0,0 +1,11 @@
+--- cWnn/cd/cserverrc.orig 2001-06-15 02:55:58.000000000 +0900
++++ cWnn/cd/cserverrc 2008-11-01 23:33:32.000000000 +0900
+@@ -39,6 +39,8 @@
+
+ readfile sys/full.con
+
++listenaddr 127.0.0.1
++
+ max_client 32
+ max_sticky_env 10
+
diff --git a/japanese/FreeWnn-lib/files/patch-cWnn-td-tserverrc b/japanese/FreeWnn-lib/files/patch-cWnn-td-tserverrc
new file mode 100644
index 000000000000..193da0944a13
--- /dev/null
+++ b/japanese/FreeWnn-lib/files/patch-cWnn-td-tserverrc
@@ -0,0 +1,11 @@
+--- cWnn/td/tserverrc.orig 2001-06-15 02:56:03.000000000 +0900
++++ cWnn/td/tserverrc 2008-11-01 23:35:24.000000000 +0900
+@@ -35,6 +35,8 @@
+
+ readfile sys/full.con
+
++listenaddr 127.0.0.1
++
+ max_client 32
+ max_sticky_env 10
+
diff --git a/japanese/FreeWnn-lib/files/patch-kWnn-kd-kserverrc b/japanese/FreeWnn-lib/files/patch-kWnn-kd-kserverrc
new file mode 100644
index 000000000000..300e64dca5e6
--- /dev/null
+++ b/japanese/FreeWnn-lib/files/patch-kWnn-kd-kserverrc
@@ -0,0 +1,11 @@
+--- kWnn/kd/kserverrc.orig 2001-06-15 02:56:06.000000000 +0900
++++ kWnn/kd/kserverrc 2008-11-01 23:35:57.000000000 +0900
+@@ -29,6 +29,8 @@
+ ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ ;
+
++listenaddr 127.0.0.1
++
+ max_client 64
+
+ jserver_dir @LIBDIR/@LANG/dic
diff --git a/japanese/FreeWnn-server/Makefile b/japanese/FreeWnn-server/Makefile
index 67e4e5e20deb..78973f6a7828 100644
--- a/japanese/FreeWnn-server/Makefile
+++ b/japanese/FreeWnn-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= FreeWnn
PORTVERSION= 1.1.1.a021
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES?= japanese
MASTER_SITES= ftp://ftp.freewnn.org/pub/%SUBDIR%/ \
${MASTER_SITE_SOURCEFORGE_JP}
@@ -23,7 +23,7 @@ USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_AUTOTOOLS= autoconf:262 libtool:15
USE_LDCONFIG= yes
-USE_RC_SUBR= yes
+USE_RC_SUBR= # defined below
MAKE_ARGS= MANLANG="${MANLANG}" CDEBUGFLAGS="${CFLAGS}"
ALL_TARGET= includes all
INSTALL_TARGET= install install.man
@@ -46,6 +46,7 @@ MAN4.WNN= 2a_ctrl.4 2b_romkana.4 cvt_key_tbl.4 fzk.data.4 fzk.u.4 \
uumkey.4 uumrc.4 wnnenvrc.4
MAN5.WNN= pubdic.5 usr_dic.5
MANLANG.WNN= ja
+USE_RC_SUBR.WNN= wnn.sh
# CWnn
CONFIGURE_ARGS.CWNN+= --enable-Wnn=no --enable-kWnn=no \
@@ -55,14 +56,16 @@ LIB_DEPENDS.CWNN= cwnn.0:${PORTSDIR}/chinese/FreeWnn-lib
MAN1.CWNN= cserver.1 cuum.1 cwnnkill.1 cwnnstat.1 catod.1 catof.1 \
cdicsort.1 cdtoa.1 cwddel.1 cwdreg.1 cwnntouch.1
MAN4.CWNN= cst_end.4 cwnn.4 cenv.4 ckey.4
+USE_RC_SUBR.CWNN= cwnn.sh twnn.sh
# KWnn
CONFIGURE_ARGS.KWNN+= --enable-Wnn=no --enable-cWnn=no \
--with-libkwnn=-lkwnn \
--with-kwnn-libraries="${PREFIX}/lib"
LIB_DEPENDS.KWNN= kwnn.0:${PORTSDIR}/korean/FreeWnn-lib
+USE_RC_SUBR.KWNN= kwnn.sh
-.for M in LIB_DEPENDS MAN1 MAN4 MAN5 MLINKS MANLANG
+.for M in LIB_DEPENDS MAN1 MAN4 MAN5 MLINKS MANLANG USE_RC_SUBR
. if defined(${M}.${WNNTYPE})
${M}+= ${${M}.${WNNTYPE}}
. endif
diff --git a/japanese/FreeWnn-server/files/cwnn.sh.in b/japanese/FreeWnn-server/files/cwnn.sh.in
new file mode 100644
index 000000000000..6a5627663586
--- /dev/null
+++ b/japanese/FreeWnn-server/files/cwnn.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: cwnn
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+
+. %%RC_SUBR%%
+
+name=cwnn
+rcvar=`set_rcvar`
+command=%%PREFIX%%/bin/cWnn4/cserver
+procname=%%PREFIX%%/bin/cWnn4/cserver
+
+start_precmd()
+{
+ rm -f /tmp/cd_sockV4
+}
+
+stop_postcmd()
+{
+ rm -f /tmp/cd_sockV4
+}
+
+load_rc_config ${name}
+run_rc_command $1
diff --git a/japanese/FreeWnn-server/files/kwnn.sh.in b/japanese/FreeWnn-server/files/kwnn.sh.in
new file mode 100644
index 000000000000..2958360b818d
--- /dev/null
+++ b/japanese/FreeWnn-server/files/kwnn.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: kwnn
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+
+. %%RC_SUBR%%
+
+name=kwnn
+rcvar=`set_rcvar`
+command=%%PREFIX%%/bin/kWnn4/kserver
+procname=%%PREFIX%%/bin/kWnn4/kserver
+
+start_precmd()
+{
+ rm -f /tmp/kd_sockV4
+}
+
+stop_postcmd()
+{
+ rm -f /tmp/kd_sockV4
+}
+
+load_rc_config ${name}
+run_rc_command $1
diff --git a/japanese/FreeWnn-server/files/pkg-install.in b/japanese/FreeWnn-server/files/pkg-install.in
index 17d1a833683c..910c62cb1312 100644
--- a/japanese/FreeWnn-server/files/pkg-install.in
+++ b/japanese/FreeWnn-server/files/pkg-install.in
@@ -1,175 +1,46 @@
#!/bin/sh
# $FreeBSD$
-# an installation script for Wnn4.2
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} (y/n) [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-mk_startup_script() {
- _wnnname=$1
- _wnnserver=$2
- _wnn_socket=$3
- _scriptfile=${PKG_PREFIX}/etc/rc.d/${_wnnname}.sh
-
- echo "Installing ${_scriptfile} startup file.";
- cat << EOF > ${_scriptfile}
-#!/bin/sh
-#
-# PROVIDE: ${_wnnname}
-# REQUIRE: LOGIN
-#
-
-. %%RC_SUBR%%
-
-name=${_wnnname}
-rcvar=\`set_rcvar\`
-command=${_wnnserver}
-procname=${_wnnserver}
-
-load_rc_config \${name}
-
-start_precmd()
-{
- rm -f ${_wnn_socket}
-}
-
-stop_postcmd()
-{
- rm -f ${_wnn_socket}
-}
-
-run_rc_command "\$1"
-EOF
- chmod 0555 ${_scriptfile}
-
-}
case $2 in
PRE-INSTALL)
-
- ## Hack /etc/master.passwd ##
- # check
- id_69=`id -u 69 2> /dev/null`
- id_wnn=`id -u wnn 2> /dev/null`
- if [ X"$id_wnn" != X ];then
- exit 0
- elif [ X"$id_69" != X ]; then
- cat <<EOF
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-This system already has an account whose name is not 'wnn' and ID
-number is 69.
-
- '`id 69`'
-
-For Wnn4.2 in this port or package, ID number of 'wnn' has to be 69.
-Please try again after you delete the account.
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-EOF
- exit 1
- fi
-
- # add an account 'wnn' to this system
- echo ""
- echo "You need an account 'wnn' whose ID number is 69"
- if [ -z "${BATCH}" ]; then
- if yesno "Would you like to create it automatically?" y; then
- pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
- -s /nonexistent -c Wnn || exit
+ if id -u wnn > /dev/null 2>&1; then
+ echo "INFO: wnn user already exists. FreeWnn will use it."
else
- echo "Please create it, and try again."
- exit 1
+ echo "INFO: Creating 'wnn' user..."
+ if pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
+ -s /nonexistent -c Wnn; then
+ echo "INFO: Created."
+ else
+ echo "ERROR: wnn user cannot create."
+ exit 1
+ fi
fi
- else
- echo "Create it automatically!"
- check_pw
- pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
- -s /nonexistent -c Wnn || exit
- fi
- ;;
-
-POST-INSTALL)
-
- case $1 in
- ja-FreeWnn-*)
- sys_dirs="${PKG_PREFIX}/lib/wnn/ja_JP/dic/pubdic ${PKG_PREFIX}/lib/wnn/ja_JP/dic/wnncons ${PKG_PREFIX}/lib/wnn/ja_JP/dic/gerodic"
- usr_dirs=${PKG_PREFIX}/lib/wnn/ja_JP/dic/usr
- wnnserver=${PKG_PREFIX}/bin/Wnn4/jserver
- wnntouch=${PKG_PREFIX}/bin/Wnn4/wnntouch
- wnnstat=${PKG_PREFIX}/bin/Wnn4/wnnstat
- wnnkill=${PKG_PREFIX}/bin/Wnn4/wnnkill
- wnnname=wnn
- wnn_socket=/tmp/jd_sockV4
- wnn_lang=ja_JP
- mk_startup_script ${wnnname} ${wnnserver} ${wnn_socket}
- ;;
- zh-FreeWnn-*)
- sys_dirs="${PKG_PREFIX}/lib/wnn/zh_CN/dic/sys ${PKG_PREFIX}/lib/wnn/zh_TW/dic/sys"
- usr_dirs="${PKG_PREFIX}/lib/wnn/zh_CN/dic/usr ${PKG_PREFIX}/lib/wnn/zh_TW/dic/usr"
- wnnserver=${PKG_PREFIX}/bin/cWnn4/cserver
- wnntouch=${PKG_PREFIX}/bin/cWnn4/cwnntouch
- wnnstat=${PKG_PREFIX}/bin/cWnn4/cwnnstat
- wnnkill=${PKG_PREFIX}/bin/cWnn4/cwnnkill
- wnnname=cwnn
- wnn_socket=/tmp/cd_sockV4
- wnn_lang=zh_CN
- mk_startup_script ${wnnname} ${wnnserver} ${wnn_socket}
-
- wnnserver=${PKG_PREFIX}/bin/cWnn4/tserver
- wnn_lang=zh_TW
- wnnname=twnn
- wnn_socket=/tmp/td_sockV4
- mk_startup_script ${wnnname} ${wnnserver} ${wnn_socket}
- ;;
- ko-FreeWnn-*)
- sys_dirs="${PKG_PREFIX}/lib/wnn/ko_KR/dic/sys"
- usr_dirs=${PKG_PREFIX}/lib/wnn/ko_KR/dic/usr
- wnnserver=${PKG_PREFIX}/bin/kWnn4/kserver
- wnntouch=${PKG_PREFIX}/bin/kWnn4/kwnntouch
- wnnstat=${PKG_PREFIX}/bin/kWnn4/kwnnstat
- wnnkill=${PKG_PREFIX}/bin/kWnn4/kwnnkill
- wnnname=kwnn
- wnn_socket=/tmp/kd_sockV4
- wnn_lang=ko_KR
- mk_startup_script ${wnnname} ${wnnserver} ${wnn_socket}
- ;;
- esac
-
- chown wnn $wnnserver
- for dir in $sys_dirs; do
- $wnntouch $dir/*
- done
- for dir in $usr_dirs; do
- if [ ! -d $dir ]; then
- mkdir -p $dir
- fi
- chown wnn $dir
- done
;;
+POST-INSTALL)
+ case $1 in
+ ja-FreeWnn-*)
+ mkdir -p ${PKG_PREFIX}/lib/wnn/ja_JP/dic/usr
+ chown wnn ${PKG_PREFIX}/lib/wnn/ja_JP/dic/usr
+ chown wnn ${PKG_PREFIX}/bin/Wnn4/jserver
+ ${PKG_PREFIX}/bin/Wnn4/wnntouch \
+ ${PKG_PREFIX}/lib/wnn/ja_JP/dic/pubdic/* \
+ ${PKG_PREFIX}/lib/wnn/ja_JP/dic/wnncons/* \
+ ${PKG_PREFIX}/lib/wnn/ja_JP/dic/gerodic/*
+ ;;
+ zh-FreeWnn-*)
+ mkdir -p ${PKG_PREFIX}/lib/wnn/zh_CN/dic/usr ${PKG_PREFIX}/lib/wnn/zh_TW/dic/usr
+ chown wnn ${PKG_PREFIX}/lib/wnn/zh_CN/dic/usr ${PKG_PREFIX}/lib/wnn/zh_TW/dic/usr
+ chown wnn ${PKG_PREFIX}/bin/cWnn4/cserver ${PKG_PREFIX}/bin/cWnn4/tserver
+ ${PKG_PREFIX}/bin/cWnn4/cwnntouch \
+ ${PKG_PREFIX}/lib/wnn/zh_CN/dic/sys/* \
+ ${PKG_PREFIX}/lib/wnn/zh_TW/dic/sys/*
+ ;;
+ ko-FreeWnn-*)
+ mkdir -p ${PKG_PREFIX}/lib/wnn/ko_KR/dic/usr
+ chown wnn ${PKG_PREFIX}/lib/wnn/ko_KR/dic/usr
+ chown wnn ${PKG_PREFIX}/bin/kWnn4/kserver
+ ${PKG_PREFIX}/bin/kWnn4/kwnntouch \
+ ${PKG_PREFIX}/lib/wnn/ko_KR/dic/sys/*
+ ;;
+ esac
esac
diff --git a/japanese/FreeWnn-server/files/twnn.sh.in b/japanese/FreeWnn-server/files/twnn.sh.in
new file mode 100644
index 000000000000..f68f6e133115
--- /dev/null
+++ b/japanese/FreeWnn-server/files/twnn.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: twnn
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+
+. %%RC_SUBR%%
+
+name=twnn
+rcvar=`set_rcvar`
+command=%%PREFIX%%/bin/cWnn4/tserver
+procname=%%PREFIX%%/bin/cWnn4/tserver
+
+start_precmd()
+{
+ rm -f /tmp/td_sockV4
+}
+
+stop_postcmd()
+{
+ rm -f /tmp/td_sockV4
+}
+
+load_rc_config ${name}
+run_rc_command $1
diff --git a/japanese/FreeWnn-server/files/wnn.sh.in b/japanese/FreeWnn-server/files/wnn.sh.in
new file mode 100644
index 000000000000..a3b27c03c8f1
--- /dev/null
+++ b/japanese/FreeWnn-server/files/wnn.sh.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# PROVIDE: wnn
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+
+. %%RC_SUBR%%
+
+name=wnn
+rcvar=`set_rcvar`
+command=%%PREFIX%%/bin/Wnn4/jserver
+procname=%%PREFIX%%/bin/Wnn4/jserver
+
+
+start_precmd()
+{
+ rm -f /tmp/jd_sockV4
+}
+
+stop_postcmd()
+{
+ rm -f /tmp/jd_sockV4
+}
+
+load_rc_config ${name}
+run_rc_command $1
diff --git a/japanese/FreeWnn-server/pkg-plist b/japanese/FreeWnn-server/pkg-plist
index e3ce8cba26f6..9bea8d4f8aed 100644
--- a/japanese/FreeWnn-server/pkg-plist
+++ b/japanese/FreeWnn-server/pkg-plist
@@ -10,7 +10,6 @@ bin/Wnn4/wnnkill
bin/Wnn4/wnnstat
bin/Wnn4/wnntouch
@dirrm bin/Wnn4
-etc/rc.d/wnn.sh
lib/wnn/ja_JP/dic/gerodic/g-jinmei.dic
lib/wnn/ja_JP/dic/pubdic/bio.dic
lib/wnn/ja_JP/dic/pubdic/chimei.dic
diff --git a/korean/FreeWnn-server/pkg-plist b/korean/FreeWnn-server/pkg-plist
index 290a3c296a0b..73a9d41a7b6e 100644
--- a/korean/FreeWnn-server/pkg-plist
+++ b/korean/FreeWnn-server/pkg-plist
@@ -9,7 +9,6 @@ bin/kWnn4/kwnnkill
bin/kWnn4/kwnnstat
bin/kWnn4/kwnntouch
@dirrm bin/kWnn4
-etc/rc.d/kwnn.sh
lib/wnn/ko_KR/dic/sys/full.fzk
lib/wnn/ko_KR/dic/sys/hword.dic
lib/wnn/ko_KR/dic/sys/single.dic