an easy and consistent way of installing software ported to FreeBSD
This is a port of 'Wnn6 for Linux/FreeBSD', a Japanese input
method. 'Wnn6' is not free.
Note that 'Wnn6 for Linux/FreeBSD' is an old version, and you can
buy a newer version from Omron Software Co., Ltd. The newer Wnn6 is a
package-style for FreeBSD, so you can pkg_add it directly. That is, it
is not necessary to use this port if yours is the newer version.
+------------------------------------------+
| WWW: http://www.omronsoft.co.jp |
| E-mail: wnn-info@omronsoft.co.jp |
| TEL: +81-44-246-6006 |
| FAX: +81-44-246-6011 |
+------------------------------------------+
Remark: If a value of ${PKG_PREFIX} is not '/usr/local', the following
symbolic links are made:
"/usr/local/bin/Wnn6" to "${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd" and,
"/usr/local/lib/wnn6" to "${PKG_PREFIX}/OMRONWnn6/wnn6fbsd".
- S. Taoka
taoka@FreeBSD.org
#!/bin/sh
# an installation script for Wnn6
check_pw()
{
if which -s pw; then
:
else
cat <
This system looks like a pre-2.2 version of FreeBSD. We see that it
is missing the "pw" utility. We need this utility. Please get and
install it, and try again. You can get the source from:
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
EOF
exit 1
fi
}
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
}
case $2 in
PRE-INSTALL)
## Hack /etc/services ##
FILE="/etc/services"
# check
OK=no
HAS_WNN6=no
COUNT=1
for i in `grep wnn6 $FILE `; do
if [ $COUNT = 1 ] && [ X"$i" = X"wnn6" ]; then
HAS_WNN6=yes
elif [ $COUNT = 2 ] && [ $HAS_WNN6 = yes ] && \
[ X"$i" = X"22273/tcp" ]; then
OK=yes
break
fi
COUNT=`expr ${COUNT} + 1`
done
# add an entry for wnn6 to /etc/services
if [ $OK = no ]; then
echo "This system has no entry for Wnn6 in ${FILE}"
if yesno "Would you like to add it automatically?" y; then
mv ${FILE} ${FILE}.bak
(grep -v wnn6 ${FILE}.bak ; \
echo "wnn6 22273/tcp # Wnn6") >> ${FILE}
rm ${FILE}.bak
else
echo "Please add 'wnn6 22273/tcp' into ${FILE}, and try again."
exit 1
fi
fi
## 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" = X69 ];then
exit 0
elif [ X"$id_69" != X ]; then
cat <
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This system already has an account whose name is not 'wnn' and ID
number is 69.
'`id 69`'
For Wnn6 in this port or package, ID number of 'wnn' has to be 69.
Please try again after you delete the account.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
exit 1
elif [ X"$id_wnn" != X ]; then
cat <
This system has an 'wnn' account whose ID number is $id_wnn. It seems
that Wnn4.2 has been already installed. For Wnn6 in this ports or
package, ID number of 'wnn' has to be 69. So we do the following two
things:
1) You should delete the account.
2) It seems that all of files or directories for Wnn4.2 are in
${PKG_PREFIX}/lib/wnn and ${PKG_PREFIX}/bin. You should change these ID
number from '$id_wnn' to '69'.
Notice: After doing 1) and 2), we will create a new 'wnn' account
whose ID number is '69'.
EOF
if yesno "Would you like to do the above things automatically" y; then
# We need a command 'pw(8)'
check_pw
pw userdel wnn
if [ $? != 0 ]; then
echo ""
echo "Cannot delete it. Please do it, and try again."
exit 1
fi
find ${PKG_PREFIX}/lib/wnn ${PKG_PREFIX}/bin \
-user $id_wnn -exec chown 69 {} \;
else
echo "Please do those, and try again."
exit 1
fi
fi
# add an account 'wnn' to this system
echo ""
echo "You need an account 'wnn' whose ID number is 69"
if yesno "Would you like to create it automatically?" y; then
# We need a command 'pw(8)'
check_pw
pw useradd wnn -u 69 -g 7 -h - -d /nonexistent \
-s /nonexistent -c Wnn6 || exit
else
echo "Please create it, and try again."
exit 1
fi
;;
POST-INSTALL)
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cd /usr/local/bin; rm -f Wnn6; ln -s ${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd Wnn6
cd /usr/local/lib; rm -f wnn6; ln -s ${PKG_PREFIX}/OMRONWnn6/wnn6fbsd wnn6
if [ X${PKG_PREFIX} != X"/usr/local" ]; then
echo
echo "Warning!!"
echo "We made symbolic links from \"/usr/local/bin/Wnn6\" to \"${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd\""
echo "and from \"/usr/local/lib/wnn6\" to \"${PKG_PREFIX}/OMRONWnn6/wnn6fbsd\""
fi
cd ${PKG_PREFIX}/OMRONWnn6/wnn6fbsd/ja_JP; rm -f dic; ln -s ../../wnn6dic dic
chown -R wnn ${PKG_PREFIX}/OMRONWnn6
chmod 4555 ${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd/jserver
chmod 4555 ${PKG_PREFIX}/OMRONWnn6/Wnn6fbsd/wnnds
## create a startup script ##
wnnserver=/usr/local/bin/Wnn6/jserver
wnnname=Wnn6
startup_script=${PKG_PREFIX}/etc/rc.d/${wnnname}.sh
if [ ! -f ${startup_script} ]; then
echo "Installing ${startup_script} startup file."
echo '#!/bin/sh' > ${startup_script};
echo "wnn=${wnnserver}" >> ${startup_script};
echo 'case $1 in' >> ${startup_script};
echo 'start)' >> ${startup_script};
echo ' if [ -f $wnn ]; then' >> ${startup_script};
echo " echo -n ' ${wnnname}'" >> ${startup_script};
echo ' $wnn' >> ${startup_script};
echo " fi" >> ${startup_script};
echo ' ;;' >> ${startup_script};
echo 'stop)' >> ${startup_script};
echo ' killall $wnn' >> ${startup_script};
echo " echo -n ' ${wnnname}'" >> ${startup_script};
echo ' ;;' >> ${startup_script};
echo '*)' >> ${startup_script};
echo ' echo "Usage: `basename $0` {start|stop}" >&2' >> ${startup_script};
echo ' ;;' >> ${startup_script};
echo 'esac' >> ${startup_script};
echo 'exit 0' >> ${startup_script};
chmod 755 ${startup_script}
chown bin:bin ${startup_script}
fi
;;
esac
OMRONWnn6/doc/copyright.html
OMRONWnn6/doc/man07.0006.i.jpg
OMRONWnn6/doc/man07.0004.i.jpg
OMRONWnn6/doc/man07.0003.i.jpg
OMRONWnn6/doc/man06.html
OMRONWnn6/doc/man05.html
OMRONWnn6/doc/man05.0002.i.jpg
OMRONWnn6/doc/man04.html
OMRONWnn6/doc/man04.0005.i.jpg
OMRONWnn6/doc/man04.0003.i.jpg
OMRONWnn6/doc/man03.html
OMRONWnn6/doc/man03.0018.i.jpg
OMRONWnn6/doc/man03.0016.i.jpg
OMRONWnn6/doc/man03.0006.i.jpg
OMRONWnn6/doc/man02.html
OMRONWnn6/doc/man02.0033.i.jpg
OMRONWnn6/doc/man02.0006.i.jpg
OMRONWnn6/doc/man02.0002.i.jpg
OMRONWnn6/doc/man01.html
OMRONWnn6/doc/intro-02.html
OMRONWnn6/doc/intro-02.0001.i.jpg
OMRONWnn6/doc/intro-01.html
OMRONWnn6/doc/index.html
OMRONWnn6/doc/hajimeni.html
OMRONWnn6/doc/furoku-symbol.html
OMRONWnn6/doc/furoku-error.html
OMRONWnn6/doc/man07.html
OMRONWnn6/wnn6dic/bushu/bushu.dic
OMRONWnn6/wnn6dic/bushu/bushu.fzk
OMRONWnn6/wnn6dic/iwanami/fisd
OMRONWnn6/wnn6dic/iwanami/ikeiji.dic
OMRONWnn6/wnn6dic/iwanami/kihon.dic
OMRONWnn6/wnn6dic/iwanami/kougo.fzk
OMRONWnn6/wnn6dic/iwanami/std.fzk
OMRONWnn6/wnn6dic/iwanami/symbol.dic
OMRONWnn6/wnn6dic/iwanami/tankan.dic
OMRONWnn6/wnn6dic/iwanami/tankan2.dic
OMRONWnn6/wnn6dic/iwanami/tankan3.dic
OMRONWnn6/wnn6dic/iwanami/tel.dic
OMRONWnn6/wnn6dic/iwanami/zip.dic
OMRONWnn6/wnn6fbsd/ja_JP/jserverrc
OMRONWnn6/wnn6fbsd/ja_JP/hinsi.data
OMRONWnn6/wnn6fbsd/ja_JP/wnnstat.msg
OMRONWnn6/wnn6fbsd/ja_JP/libwnn.msg
OMRONWnn6/wnn6fbsd/ja_JP/uumrc
OMRONWnn6/wnn6fbsd/ja_JP/wnnenvrc
OMRONWnn6/wnn6fbsd/ja_JP/otow.format/atok7-wnn6.fmt
OMRONWnn6/wnn6fbsd/ja_JP/otow.format/atok8-wnn6.fmt
OMRONWnn6/wnn6fbsd/ja_JP/otow.format/egbridge-wnn6.fmt
OMRONWnn6/wnn6fbsd/ja_JP/otow.format/vje-wnn6.fmt
OMRONWnn6/wnn6fbsd/offlinerc
OMRONWnn6/wnn6fbsd/serverdefs
OMRONWnn6/wnn6fbsd/udmergerc
OMRONWnn6/wnnsdk/mule-2.2.2/README.mule
OMRONWnn6/wnnsdk/mule-2.2.2/mule-2.2.2-wnn6.diff
OMRONWnn6/wnnsdk/sdk/SunOS-4.1.tar.gz
OMRONWnn6/wnnsdk/sdk/Solaris-2.4.tar.gz
OMRONWnn6/wnnsdk/sdk/IRIX-5.3.tar.gz
OMRONWnn6/wnnsdk/sdk/DGUX-5.4.tar.gz
OMRONWnn6/wnnsdk/sdk/Solaris-2.4-x86.tar.gz
OMRONWnn6/wnnsdk/sdk/BSD386-1.1.tar.gz
OMRONWnn6/wnnsdk/sdk/AIX-3.2.tar.gz
OMRONWnn6/wnnsdk/sdk/AlphaOSF1-1.2.tar.gz
OMRONWnn6/wnnsdk/sdk/EWS-UX-4.0.tar.gz
OMRONWnn6/wnnsdk/sdk/FreeBSD-2.0.5R.tar.gz
OMRONWnn6/wnnsdk/sdk/HI-UX-3050RX.tar.gz
OMRONWnn6/wnnsdk/sdk/HPUX-9.0.tar.gz
OMRONWnn6/wnnsdk/sdk/LUNA88K-2.0.tar.gz
OMRONWnn6/wnnsdk/sdk/Linux-1.2.8.tar.gz
OMRONWnn6/wnnsdk/sdk/NEWS-OS-4.2R.tar.gz
OMRONWnn6/wnnsdk/sdk/NEWS-OS-6.0.tar.gz
OMRONWnn6/wnnsdk/sdk/UniOS-U-3.0.tar.gz
OMRONWnn6/wnnsdk/sdk/AlphaOSF1-3.2A.tar.gz
OMRONWnn6/wnnsdk/sdk/FreeBSD-2.2R.tar.gz
OMRONWnn6/wnnsdk/sdk/Linux-2.0.0.tar.gz
OMRONWnn6/Wnn6fbsd/atod
OMRONWnn6/Wnn6fbsd/dtoa
OMRONWnn6/Wnn6fbsd/jserver
OMRONWnn6/Wnn6fbsd/otow
OMRONWnn6/Wnn6fbsd/udmerge
OMRONWnn6/Wnn6fbsd/wnnaccess
OMRONWnn6/Wnn6fbsd/wnnds
OMRONWnn6/Wnn6fbsd/wnnkill
OMRONWnn6/Wnn6fbsd/wnnoffline
OMRONWnn6/Wnn6fbsd/wnnstat
OMRONWnn6/Wnn6fbsd/wnntouch
OMRONWnn6/README.sjis
OMRONWnn6/README.jis
OMRONWnn6/README.euc
@dirrm OMRONWnn6/wnnsdk/sdk
@dirrm OMRONWnn6/wnnsdk/mule-2.2.2
@dirrm OMRONWnn6/wnnsdk
@dirrm OMRONWnn6/wnn6fbsd/ja_JP/otow.format
@unexec rm %D/OMRONWnn6/wnn6fbsd/ja_JP/dic
@dirrm OMRONWnn6/wnn6fbsd/ja_JP
@dirrm OMRONWnn6/wnn6fbsd
@dirrm OMRONWnn6/wnn6dic/iwanami
@dirrm OMRONWnn6/wnn6dic/bushu
@dirrm OMRONWnn6/wnn6dic
@dirrm OMRONWnn6/doc
@dirrm OMRONWnn6/Wnn6fbsd
@dirrm OMRONWnn6
etc/rc.d/Wnn6.sh
@unexec rm /usr/local/bin/Wnn6
@unexec rm /usr/local/lib/wnn6