3 AUTHOR: Wolfgang Arendt <Wolfgang.Arendt@gmx.de>
6 Installing printing software on an LFS system
17 * Installing Ghostscript
20 * Installing apsfilter
24 This document describes all steps, that have to be taken, in order to
25 make an LFS system print. It is based on the printing hint by Fabio
26 Fracassi and on the ghostscript hint written by myself.
30 The basic printing system consists of the following packages:
31 * gdbm-1.8.0.tar.gz: ftp://ftp.gnu.org/gnu/gdbm/
32 * LPRng-3.8.4.tgz: ftp://ftp.lprng.com/pub/LPRng/LPRng/
33 * psutils-p17.tar.gz: ftp://ftp.dcs.ed.ac.uk/pub/ajcd/
34 * a2ps-4.13:a2ps-4.13: ftp://ftp.enst.fr/pub/unix/a2ps/
35 * apsfilter-7.1.1.tar.gz: http://www.apsfilter.org/download/
36 * ghostscript-7.00.tar.gz:
37 http://download.sourceforge.net/ghostscript/
39 We will build LPRNG with gdbm support. It will run as user lp, member
40 of the daemon group. In this example, the GID of the group daemon is 5
41 and so is the UID of the user lp. Please modify all commands to fit
42 your environment. All components will install their configuration into
47 First, check, whether you have a user named lp, that is member of
48 group daemon. If so, then skip the rest of this section.
50 All others create the user with the following commands:
52 useradd -u 5 -d /var/spool/lp -s /bin/sh -g daemon lp
56 The configure script does not seem to recognize the --prefix=...
57 option correctly, so we will manually make an adjustment to the
72 LPRNG seems to behave a little nasty, if you use optimization higher
73 than O2. You may try to compile it with your usual compiler flags. But
74 if this fails, try "-O2"
76 Build LPRNG with the following commands:
77 ./configure --prefix=/usr \
80 --with-groupid=daemon &&
84 Instead of using the start stop script, that comes with LPRng, create
85 such a file from the template.
87 Installing Ghostscript
89 Extract ghostscript and change to the top-level-directory of the
90 distribution. If you use version 5.10 you will find all the source
91 files in that directory. Users of version 6.5 and higher will find
92 subdirectories there, containing the sources, libraries etc.
94 If you can not find a file named unix-gcc.mak in your present
95 directory (which should be gs<VERSION>), then copy it there from the
98 Stay in the same directory and extract the zlib-package. This creates
99 a directory named zlib-1.1.3. Rename this directory to zlib (or make a
102 Extract jpegsrc.v6b.tar.gz and rename the jpeg-6b directory to jpeg
105 Extract libpng-1.2.1.tar.gz and move the libpng-1.2.1-directory to
106 libpng (or - guess, what - make a symlink).
108 Create the file changes.sed, containing the following lines:
109 s|XINCLUDE=-I/usr/local/X/include|XINCLUDE=-I/usr/X11R6/include|
110 s|XLIBDIRS=-L/usr/X11/lib|XLIBDIRS=-L/usr/X11R6/lib|
112 s|prefix = /usr/local|prefix = /usr|
115 Now create the Makefile, by running the following command:
116 sed -n -f changes.sed unix-gcc.mak
118 Now, you should be ready to compile the whole thing. Just run:
122 If the compilation fails with error messages, containing something
123 about zdevcal.c, then append the line
126 to the file src/time_.h and try again. (This might have to do with
127 glibc-2.2.... but I am not sure about it).
129 Finally extract the fonts to the /usr/share/ghostscript directory. The
130 directory structure should look somewhat like this:
131 /usr/share/ghostscript
132 /usr/share/ghostscript/gs7.00
133 /usr/share/ghostscript/fonts
137 The following command will install psutils. It is configured for paper
138 size a4. If you need another media type, then you need to change the
139 line beginning with PAPER= in the Makefile.
140 cp Makefile.unix Makefile &&
143 /^INCLUDEDIR/s#/local##
154 Compile a2ps by entering:
155 ./configure --prefix=/usr \
163 First of all, it has to be said, that apsfilter does not build, if you
164 do not have a mail transfer agent installed, whose binary is linked to
165 /usr/bin/sendmail. If you (like me) have a machine, whithout such
166 program, you can still get apsfilter to compile if you just create a
167 fake sendmail by touching the file named /usr/bin/sendmail and making
169 touch /usr/bin/sendmail &&
170 chmod 750 /usr/bin/sendmail
172 Then, compile apsfilter by entering
173 ./configure --prefix=/usr \
178 Last thing, that you have to do is, to configure apsfilter using
179 /usr/share/apsfilter/SETUP.