diff options
author | ache <ache@FreeBSD.org> | 1998-08-02 20:56:28 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-08-02 20:56:28 +0800 |
commit | c68fed26f300d33d28d3978f5cb3acc11f2531b7 (patch) | |
tree | 5094692ee3118c657edfd11912f62555f1a85a53 /russian/X.language/pkg-install | |
parent | fd83ff97e150a0ef9de5eedc6c6a94f277e39225 (diff) | |
download | freebsd-ports-graphics-c68fed26f300d33d28d3978f5cb3acc11f2531b7.tar.gz freebsd-ports-graphics-c68fed26f300d33d28d3978f5cb3acc11f2531b7.tar.zst freebsd-ports-graphics-c68fed26f300d33d28d3978f5cb3acc11f2531b7.zip |
Install free fonts by default.
Package tweaks
Diffstat (limited to 'russian/X.language/pkg-install')
-rw-r--r-- | russian/X.language/pkg-install | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/russian/X.language/pkg-install b/russian/X.language/pkg-install new file mode 100644 index 00000000000..79d14937346 --- /dev/null +++ b/russian/X.language/pkg-install @@ -0,0 +1,72 @@ +#!/bin/sh + +if [ "$2" != POST-INSTALL ] ; then + exit 0 +fi + +X11BASE=/usr/X11R6 +FILESDIR=${X11BASE}/.Xinstmp +XLIB=${X11BASE}/lib/X11 +CYRF=${XLIB}/fonts/cyrillic +T1DIR=${XLIB}/fonts/Type1/fonts.dir +T1SCALE=${XLIB}/fonts/Type1/fonts.scale + +for i in ${T1DIR} ${T1SCALE}; do +grep -q cokoi8n $i || { + cp $i $i.bak; + d_cnt=`grep '^[1-9][0-9]*$' $i.bak`; + d_add=`wc -l < ${FILESDIR}/fonts.dir-scale.add`; + d_new=`expr $d_cnt + $d_add`; + sed 's/^[1-9][0-9]*$/'$d_new/ < $i.bak > $i; + cat ${FILESDIR}/fonts.dir-scale.add >> $i; +}; +done +if [ -f /etc/XF86Config ]; then + grep -q ${CYRF}/misc /etc/XF86Config || { + cp /etc/XF86Config /etc/XF86Config.old; + (echo "/^[ ]*FontPath/i"; \ + echo " FontPath \"${CYRF}/75dpi\""; + echo " FontPath \"${CYRF}/100dpi\""; + echo " FontPath \"${CYRF}/misc\""; + echo "."; echo "w"; echo "q"; ) > /tmp/ed.$$; + ed - /etc/XF86Config < /tmp/ed.$$; + rm -f /tmp/ed.$$; + }; +fi +if [ ! -f ${XLIB}/nls/nls.dir ] ; then + dl=`wc -l < ${FILESDIR}/nls_dir_list`; + echo $dl > ${XLIB}/nls/nls.dir; + cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir; + chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.dir; + chmod 644 ${XLIB}/nls/nls.dir; +else + grep -q KOI8-R ${XLIB}/nls/nls.dir || { + cp ${XLIB}/nls/nls.dir ${XLIB}/nls/nls.dir.bak; + d_sub=`grep -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | wc -l`; + d_cnt=`grep '^[1-9][0-9]*$' ${XLIB}/nls/nls.dir.bak`; + d_add=`wc -l < ${FILESDIR}/nls_dir_list`; + d_new=`expr $d_cnt + $d_add - $d_sub`; + grep -v -f ${FILESDIR}/replace_nls_list < ${XLIB}/nls/nls.dir.bak | \ + sed 's/^[1-9][0-9]*$/'$d_new/ > ${XLIB}/nls/nls.dir; + cat ${FILESDIR}/nls_dir_list >> ${XLIB}/nls/nls.dir; + }; +fi +if [ ! -f ${XLIB}/nls/nls.alias ] ; then + al=`wc -l < ${FILESDIR}/nls_alias_list`; + echo $al > ${XLIB}/nls/nls.alias; + cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias; + chown ${BINOWN}.${BINGRP} ${XLIB}/nls/nls.alias; + chmod 644 ${XLIB}/nls/nls.alias; +else + grep -q KOI8-R ${XLIB}/nls/nls.alias || { + a_cnt=`grep '^[1-9][0-9]*$' ${XLIB}/nls/nls.alias`; + a_add=`wc -l < ${FILESDIR}/nls_alias_list`; + a_new=`expr $a_cnt + $a_add`; + cp ${XLIB}/nls/nls.alias ${XLIB}/nls/nls.alias.bak; + sed "s/^[1-9][0-9]*$/$a_new/;q" < ${XLIB}/nls/nls.alias.bak > ${XLIB}/nls/nls.alias; + cat ${FILESDIR}/nls_alias_list >> ${XLIB}/nls/nls.alias; + }; +fi + +rm -rf ${FILESDIR} +exit 0 |