fonts-misc-console.SlackBuild

Код:
#!/bin/bash

CWD=$(pwd)
TMP=${TMP:-/tmp}

mkdir ~/bld ; cd ~/bld

mkdir -p ./etc/fonts/conf.avail
mkdir -p ./etc/fonts/conf.d
mkdir -p ./usr/share/doc/fonts-misc-console-0.3
cat $CWD/fonts-misc-console.SlackBuild > ~/bld/usr/share/doc/fonts-misc-console-0.3/fonts-misc-console.SlackBuild
mkdir install 
mkdir -p ./usr/share/fonts/misc

echo '                  |-----handy-ruler------------------------------------------------------|'    	 > ~/bld/install/slack-desc
echo 'fonts-misc-console: The bitmap-fonts package provides a number of bitmap fonts selected'        >> ~/bld/install/slack-desc
echo 'fonts-misc-console: from the xorg package designed for use locations such as terminals.'        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console: Home: http://www.xorg.net'                	>> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc
echo 'fonts-misc-console:'                        >> ~/bld/install/slack-desc

echo '<?xml version="1.0" encoding="UTF-8"?>'                     > ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">'                	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '<fontconfig>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '  <alias>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    <family>monospace</family>'                    	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    <prefer>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '      <family>Console</family>'                    	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    </prefer>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '  </alias>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '  <alias>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    <family>Console</family>'                    	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    <default>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '      <family>monospace</family>'                    	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '    </default>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '  </alias>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf
echo '</fontconfig>'                        	>> ~/bld/etc/fonts/conf.avail/66-fonts-misc-console.conf

echo '#!/bin/sh'                        	 > ~/bld/install/doinst.sh
echo ''                            	>> ~/bld/install/doinst.sh
echo '( cd etc/fonts/conf.d ; rm -rf 66-fonts-misc-console.conf )'            	>> ~/bld/install/doinst.sh
echo '( cd etc/fonts/conf.d ; ln -sf /etc/fonts/conf.avail/66-fonts-misc-console.conf 66-fonts-misc-console.conf )'	>> ~/bld/install/doinst.sh
echo ''                            	>> ~/bld/install/doinst.sh
echo '# Update the X font indexes:'                    	>> ~/bld/install/doinst.sh
echo 'if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then'            >> ~/bld/install/doinst.sh
echo '  ( cd /usr/share/fonts/misc'                    	>> ~/bld/install/doinst.sh
echo '    mkfontscale .'                        >> ~/bld/install/doinst.sh
echo '    mkfontdir .'                        	>> ~/bld/install/doinst.sh
echo '  )'                            >> ~/bld/install/doinst.sh
echo 'fi'                            >> ~/bld/install/doinst.sh
echo 'if [ -x /usr/bin/fc-cache ]; then'                    >> ~/bld/install/doinst.sh
echo '  /usr/bin/fc-cache -f'                        >> ~/bld/install/doinst.sh
echo 'fi'                            >> ~/bld/install/doinst.sh



cd ./usr/share/fonts/misc
wget http://xiangelinux.googlecode.com/files/console8x16.pcf.gz
cd ~/bld
makepkg -l y -c n $TMP/fonts-misc-console-0.3-noarch-1_dlx.txz