TITLE: Printing LFS VERSION: Any AUTHOR: Wolfgang Arendt SYNOPSIS: Installing printing software on an LFS system HINT: Table of contents * Introduction * Packages * Users and groups * Building gdbm * Building LPRNG * Installing Ghostscript * Installing psutils * Installing a2ps * Installing apsfilter Introduction This document describes all steps, that have to be taken, in order to make an LFS system print. It is based on the printing hint by Fabio Fracassi and on the ghostscript hint written by myself. Packages The basic printing system consists of the following packages: * gdbm-1.8.0.tar.gz: ftp://ftp.gnu.org/gnu/gdbm/ * LPRng-3.8.4.tgz: ftp://ftp.lprng.com/pub/LPRng/LPRng/ * psutils-p17.tar.gz: ftp://ftp.dcs.ed.ac.uk/pub/ajcd/ * a2ps-4.13:a2ps-4.13: ftp://ftp.enst.fr/pub/unix/a2ps/ * apsfilter-7.1.1.tar.gz: http://www.apsfilter.org/download/ * ghostscript-7.00.tar.gz: http://download.sourceforge.net/ghostscript/ We will build LPRNG with gdbm support. It will run as user lp, member of the daemon group. In this example, the GID of the group daemon is 5 and so is the UID of the user lp. Please modify all commands to fit your environment. All components will install their configuration into the /etc directory. Users and groups First, check, whether you have a user named lp, that is member of group daemon. If so, then skip the rest of this section. All others create the user with the following commands: groupadd -g 5 daemon useradd -u 5 -d /var/spool/lp -s /bin/sh -g daemon lp Building gdbm The configure script does not seem to recognize the --prefix=... option correctly, so we will manually make an adjustment to the Makefile. Enter: ./configure && ed Makefile <), then copy it there from the src subdirectory. Stay in the same directory and extract the zlib-package. This creates a directory named zlib-1.1.3. Rename this directory to zlib (or make a symlink). Extract jpegsrc.v6b.tar.gz and rename the jpeg-6b directory to jpeg (or make a symlink). Extract libpng-1.2.1.tar.gz and move the libpng-1.2.1-directory to libpng (or - guess, what - make a symlink). Create the file changes.sed, containing the following lines: s|XINCLUDE=-I/usr/local/X/include|XINCLUDE=-I/usr/X11R6/include| s|XLIBDIRS=-L/usr/X11/lib|XLIBDIRS=-L/usr/X11R6/lib| s|jpeg-6a|jpeg| s|prefix = /usr/local|prefix = /usr| w Makefile Now create the Makefile, by running the following command: sed -n -f changes.sed unix-gcc.mak Now, you should be ready to compile the whole thing. Just run: make && make install If the compilation fails with error messages, containing something about zdevcal.c, then append the line #include to the file src/time_.h and try again. (This might have to do with glibc-2.2.... but I am not sure about it). Finally extract the fonts to the /usr/share/ghostscript directory. The directory structure should look somewhat like this: /usr/share/ghostscript /usr/share/ghostscript/gs7.00 /usr/share/ghostscript/fonts Installing psutils The following command will install psutils. It is configured for paper size a4. If you need another media type, then you need to change the line beginning with PAPER= in the Makefile. cp Makefile.unix Makefile && ed Makefile <