diff options
author | Satoshi Taoka <taoka@FreeBSD.org> | 2001-11-07 17:44:36 +0000 |
---|---|---|
committer | Satoshi Taoka <taoka@FreeBSD.org> | 2001-11-07 17:44:36 +0000 |
commit | ff2835772c7d16c4be53ba4e43466649ef5f99c7 (patch) | |
tree | 486fcf6de749bbebbe2d917f6b186f296f442813 /print/pips800/files | |
parent | 49dc563ec0f258c80539930547e30c7fb8ea9354 (diff) |
Notes
Diffstat (limited to 'print/pips800/files')
-rw-r--r-- | print/pips800/files/ekpd.sh | 48 | ||||
-rw-r--r-- | print/pips800/files/en.lc | 47 | ||||
-rw-r--r-- | print/pips800/files/filter.rev_1.2 | 17 | ||||
-rw-r--r-- | print/pips800/files/ja.lc | 47 | ||||
-rw-r--r-- | print/pips800/files/readme_for_zh | 32 | ||||
-rw-r--r-- | print/pips800/files/setup | 182 |
6 files changed, 356 insertions, 17 deletions
diff --git a/print/pips800/files/ekpd.sh b/print/pips800/files/ekpd.sh new file mode 100644 index 000000000000..d9f52a25966c --- /dev/null +++ b/print/pips800/files/ekpd.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# ekpd + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/local/libexec/ekpd +LOCK=/var/ekpd/lpr_lock + +NAME=ekpd + +[ -f $DAEMON ] || exit 0 + +OLDMASK=`umask` +umask 000 + +case "$1" in + + start) + if [ -x $DAEMON ]; then + echo -n "Starting $NAME:" + [ ! -d /var/ekpd ] && mkdir -p /var/ekpd && chmod 1777 /var/ekpd + [ ! -e /var/ekpd/ekplp0 ] && rm -f /var/ekpd/ekplp0 && \ + mkfifo -m 666 /var/ekpd/ekplp0 + $DAEMON 2>/dev/null + echo + fi + ;; + + stop) + echo -n "Stopping ekpd:" + killall ${NAME} 2>/dev/null + echo + ;; + + restart) + $0 stop + sleep 2 + $0 start + ;; + + *) + echo "Usage: ekpd { start | stop | restart }" >&2 + exit 1 + ;; +esac + +umask $OLDMASK +exit 0 diff --git a/print/pips800/files/en.lc b/print/pips800/files/en.lc new file mode 100644 index 000000000000..9cb41ede7296 --- /dev/null +++ b/print/pips800/files/en.lc @@ -0,0 +1,47 @@ +#!/bin/sh +############################################################################### +### +### From @(#) Photo Image Print System -Locale file of install script +### in pips900-2.1.i386.tgz +### by taoka + +A_TXT="It starts to set up of photo Image Print System.\n"\ +"If this product does not set up, it does not operate correctly.\n" + +B_TXT="Please specify the connection of a printer.\n" + +C_TXT="Please specify the printer name when it is using by lpr.\n" + +D_TXT="Setup is complete. Is it saved?\n" + +if [ "$VERSION" = "2.0" -o "$VERSION" = "2.1" ]; then +if [ X"$WITH_EKPD" != X ]; then +E1_TXT="The following files were changed.\n"\ +"$EKPDRC\n/etc/printcap\n/etc/services\n\n"\ +"The following directories were created.\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +else +E1_TXT="The following files were changed.\n"\ +"$EKPDRC\n/etc/printcap\n\n"\ +"The following directories were created.\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +fi +else +E1_TXT="The following files were changed.\n"\ +"/etc/printcap\n\n"\ +"The following directories were created.\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +fi + +E2_TXT="\nIt saved. Setup is complete.\n"\ +"Start $SETUP_PATH to change setup.\n" + +F_TXT="Setup is canceled. Setup is not complete yet\n"\ +"Set up by starting $SETUP_PATH.\n" + +S1_TXT="\nThis system has already an entry for ${SERV_NAME} in ${SERV_FILE}.\n" + +S2_TXT="\nThis system has no entry for ${SERV_NAME} in ${SERV_FILE}.\n" + +S3_TXT="The original file is saved as ${SERV_BACK}.\n" + diff --git a/print/pips800/files/filter.rev_1.2 b/print/pips800/files/filter.rev_1.2 deleted file mode 100644 index 028eb3205669..000000000000 --- a/print/pips800/files/filter.rev_1.2 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -PATH=${PATH}:/usr/bin:/usr/local/bin - -GSCONF=/usr/local/EPKowa/PM800C/gsconfig800 -PIPS=/usr/local/bin/pips800 - -TMP=/tmp/pips.$$ - -trap "rm -rf $TMP; exit" 0 2 3 4 6 7 8 10 11 12 13 15 -psselect -r > $TMP - -# To support printing via USB port for pips{760,770,800,820_3300} -perl -e 'print "\000\000\000\033\001\@EJL\ 1284.4\n\@EJL \n\033\@"' - -${GSCONF} < $TMP | ${PIPS} -ui C -rm -rf $TMP diff --git a/print/pips800/files/ja.lc b/print/pips800/files/ja.lc new file mode 100644 index 000000000000..41882558d0f5 --- /dev/null +++ b/print/pips800/files/ja.lc @@ -0,0 +1,47 @@ +#!/bin/sh +############################################################################### +### +### From @(#) Photo Image Print System -Locale file of install script +### in pips900-2.1.i386.tgz +### by taoka + +A_TXT="これより Photo Image Print System のセットアップを開始します。\n"\ +"本製品は設定を行わなければ正しく動作しません。\n" + +B_TXT="プリンタの接続先を指定してください。\n" + +C_TXT="lprで使用する際のプリンタ名を指定してください。\n" + +D_TXT="設定は以上です。設定を保存してよろしいですか?\n" + +if [ "$VERSION" = "2.0" -o "$VERSION" = "2.1" ]; then +if [ X"$WITH_EKPD" != X ]; then + E1_TXT="以下のファイルを変更しました。\n"\ +"$EKPDRC\n/etc/printcap\n/etc/services\n\n"\ +"以下のディレクトリを作成しました。\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +else + E1_TXT="t以下のファイルを変更しました。\n"\ +"$EKPDRC\n/etc/printcap\n\n"\ +"以下のディレクトリを作成しました。\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +fi +else +E1_TXT="s以下のファイルを変更しました。\n"\ +"/etc/printcap\n\n"\ +"以下のディレクトリを作成しました。\n"\ +"/var/spool/lpd/$PRT_NAME_LOW\n" +fi + +E2_TXT="\n保存しました。セットアップを終了します。\n"\ +"設定を変更するには $SETUP_PATH を起動してください。\n" + +F_TXT="セットアップをキャンセルします。まだ設定は終了していません。\n"\ +"$SETUP_PATHを起動して、設定を行ってください。\n" + +S1_TXT="\nこのシステムの${SERV_FILE}には、すでに${SERV_NAME}のエントリがあります。\n" + +S2_TXT="\nこのシステムの${SERV_FILE}には、${SERV_NAME}のエントリがありません。\n" + +S3_TXT="オリジナルファイルは${SERV_BACK}としてセーブしています。\n" + diff --git a/print/pips800/files/readme_for_zh b/print/pips800/files/readme_for_zh new file mode 100644 index 000000000000..6c7ff5ff49ff --- /dev/null +++ b/print/pips800/files/readme_for_zh @@ -0,0 +1,32 @@ +Notice for "env LANG=zh_CN pips800" and "env LANG=zh_TW.Big5 pips800" + +(1) Installing zh-linux-gtk and zh-cle_base leads not to work well +commands with the other locales. So this port depends on yet another +linux_locale for Chinese: chinese/linux_locale. + +(2) You add the following two files by hand: + +[/compat/linux/etc/gtk/gtkrc.zh_CN.GB2312] +style "default" { + fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\ + -*-*-medium-*-*--16-*-*-*-*-*-gb2312.1980-*" +} +class "GtkWidget" style "default" + + +[/compat/linux/etc/gtk/gtkrc.zh_TW.Big5] +style "default" { + fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\ + -*-*-medium-*-*-*-16-*-*-*-*-*-big5-*" +} +class "GtkWidget" style "default" + +and make a symlink by the next command: + +# ln -s gtkrc.zh_CN.GB2312 /compat/linux/etc/gtk/gtkrc.zh_CN + +(3) You have to install suitable fonts for zh_TW.Big5, +e.g. zh-cmexfonts. + +(4) But "env LANG=zh_CN pips800" dose not work well even if you do the +above (1) through (3). diff --git a/print/pips800/files/setup b/print/pips800/files/setup new file mode 100644 index 000000000000..7388c31c101b --- /dev/null +++ b/print/pips800/files/setup @@ -0,0 +1,182 @@ +#!/bin/sh +############################################################################### +### +### From @(#) Photo Image Print System -Setup script +### Mon Apr 23 2001 sk +### in pips900-2.1.i386.tgz +### by taoka + +SCRIPT_PATH=%%PREFIX%%/libexec/pips%%PRTYPE%%/scripts +PRT_MODEL=%%PRT_MODEL%% +PIPS_COMMAND=pips%%PRTYPE%% +PIPS_FILTER_PATH=%%PREFIX%%/libexec/%%BASE_NAME%%/filter%%PRTYPE%%.rev + +SETUP_PATH=%%PREFIX%%/libexec/pips%%PRTYPE%%/setup +EKPDRC=%%LINUXBASE%%/etc/ekpdrc +VERSION=%%VERSION%% +DEF_PRT_PATH=/dev/ulpt0 +WITH_EKPD=%%WITH_EKPD%% + + +#/etc/services +SERV_FILE=/etc/services +SERV_BACK=${SERV_FILE}.bak +SERV_NAME=cbtd +PORT=35586/tcp +COMMENT="" + +PRT_NAME_LOW=`echo $PRT_MODEL | tr '[A-Z]' '[a-z]'` + +. $SCRIPT_PATH/en.lc + +trap 'echo; printf "$F_TXT" + exit 1' 0 + +ID=`id | sed -e 's/uid=//' -e 's/(.*//'` + +if [ $ID -ne 0 ]; then + echo must run as root. + exit 0; +fi + +echo "-----------------------------------------------" +echo "" +echo " Photo Image Print System" +echo "" +echo " Setup script" +echo "" +echo "-----------------------------------------------" + +echo Please select locale to use. +echo Select : en ja #de es fr it ko nl pt zh zh_TW +echo -n '(english) > ' + +read SET_LANG +case $SET_LANG in +# [Dd][Ee] ) . $SCRIPT_PATH/de.lc ;; +# [Ee][Ss] ) . $SCRIPT_PATH/es.lc ;; +# [Ff][Rr] ) . $SCRIPT_PATH/fr.lc ;; +# [Ii][Tt] ) . $SCRIPT_PATH/it.lc ;; + [Jj][Aa] ) . $SCRIPT_PATH/ja.lc ;; +# [Kk][Oo] ) . $SCRIPT_PATH/ko.lc ;; +# [Nn][Ll] ) . $SCRIPT_PATH/nl.lc ;; +# [Pp][Tt] ) . $SCRIPT_PATH/pt.lc ;; +# [Zz][Hh] ) . $SCRIPT_PATH/zh.lc ;; +# [Zz][Hh]_[Tt][Ww] ) . $SCRIPT_PATH/zh_TW.lc ;; + *);; +esac + +printf "$A_TXT" +echo + +while : +do + printf "$B_TXT" + echo -n "($DEF_PRT_PATH) > " + + read PRT_PATH + + if [ -z $PRT_PATH ]; then + PRT_PATH=$DEF_PRT_PATH + fi + + if [ -n $PRT_PATH -a -r $PRT_PATH -a -w $PRT_PATH ]; then + break; + fi + echo "$PRT_PATH : No such file or directory." +done + +while : +do + printf "$D_TXT" + echo -n '(Yes/no) > ' + + read ANSWER + case $ANSWER in + [Yy] | [Yy]es | YES ) break ;; + [Nn] | [Nn]o | NO ) exit 0 ;; + * ) echo ? ;; + esac +done + +trap 0 +printf "$E1_TXT" +#echo $PRT_NAME +printf "$E2_TXT" + + +#/etc/ekpdrc +if [ -s $EKPDRC ]; then + cp $EKPDRC $EKPDRC.bak +fi + +cat <<EOF >$EKPDRC +PrinterName = $PRT_NAME_LOW +PrinterDevicePath = $PRT_PATH +DummyDevicePath = /var/ekpd/ekplp0 +CommandServerPort = 35586 +EOF + +#/etc/services +if [ X"$WITH_EKPD" != X ]; then + if sed 's/#.*//' ${SERV_FILE} | grep -qw ${SERV_NAME}; then + printf "$S1_TXT" + else + printf "$S2_TXT" + cp -f ${SERV_FILE} ${SERV_BACK} + printf "$S3_TXT" + + if sed 's/#.*//' ${SERV_FILE} | grep -qw ${PORT}; then + sed 's,^\([^#]*[ ]'${PORT}'\),\1 '${SERV_NAME}, ${SERV_BACK} > ${SERV_FILE} + else + echo "${SERV_NAME} ${PORT} #${COMMENT}" >> ${SERV_FILE} + fi + echo "${SERV_FILE} was changed." + fi +fi + +#/etc/printcap +if [ -s /etc/printcap ]; then + KEY=`grep "# written for $PIPS_COMMAND" /etc/printcap` + if [ -n "$KEY" ]; then + mv /etc/printcap /etc/printcap.bak + + SPOOLDIR=`cat /etc/printcap.bak | sed -n "/# written for $PIPS_COMMAND/,/# $PIPS_COMMAND end/p" | grep ":sd=" | sed -e "s/^.*:sd=//" -e "s/:.*$//"` + rm -rf $SPOOLDIR + + sed -e "/# written for $PIPS_COMMAND/,/# $PIPS_COMMAND end/d" < /etc/printcap.bak > /etc/printcap + + else + cp /etc/printcap /etc/printcap.bak + + fi +else + touch /etc/printcap +fi + +if [ X"$WITH_EKPD" != X ]; then + tmp_PRT_PATH=/var/ekpd/ekplp0 +else + tmp_PRT_PATH=$PRT_PATH +fi + +cat <<EOF >>/etc/printcap +# written for $PIPS_COMMAND +$PRT_NAME_LOW|EPSON $PRT_MODEL:\\ + :sd=/var/spool/lpd/$PRT_NAME_LOW:\\ + :mx#0:\\ + :sh:\\ + :lp=$tmp_PRT_PATH:\\ + :if=$PIPS_FILTER_PATH:\\ + :lf=/var/log/lpd-errs: +# $PIPS_COMMAND end +EOF + +OLDMASK=`umask` +umask 000 + +mkdir -p /var/spool/lpd/$PRT_NAME_LOW +chown daemon:daemon /var/spool/lpd/$PRT_NAME_LOW; chmod 770 /var/spool/lpd/$PRT_NAME_LOW + +umask $OLDMASK +exit 0 |