============================================================================
 Instructions for compiling PPR
 Last revised 3 April 1997
============================================================================

This file is INSTALL.txt from
ftp://ppr-dist.trincoll.edu/pub/ppr/ppr-src-1.30.tar.gz

This document describes the steps required to compile PPR.  This is the
source code compiling instruction document refered to in "Installing and
Using PPR".  The steps described here should be performed before performing
the steps described in "Installing and Using PPR".

=============================================================================
 Requirements:
=============================================================================

1) The PPR source archive (ppr-src-1.30.tar.gz)

2) Gunzip (to uncompress the source archive)

3) Tar (to unpack the source archive)

4) GCC version 2.5.8 or later or the native C compiler on 
   DEC OSF/1 or IRIX 6.3.

5) Lex or Flex

6) GNU dbm (GDBM) 1.5, 1.7, and possibly other versions

7) Larry Wall's program patch, version 2.1 or later

The last six items are probably already installed on Linux systems.  For
other systems, you should check first.  The version of GCC may be
determined with the command "gcc -v".

It is possible to compile and use PPR even if you don't have GDBM, but some
obscure features won't work.  Basically, the ppuser and the indexttf
programs won't work.

If you have Perl (versions 4.036 or later) that's good too.  If you 
do not have Perl 4.036 or later, the following things will not work:

* The TeX filter.  This means that you will have to run TeX source files
  through TeX or LaTeX before sending them to be printed.  (But, the DVI
  filter will still work.)

* The "atalk" responder and its daemon "atalkmapd".

* The experimental World Wide Web interface.

None of the above are very important.

If you don't have Perl 5, the "audio" responder and the audio commentator
will not work.  These are a lot of fun.

=============================================================================
 Filters
=============================================================================

If the following software is present, more input filters will be available:

* NetPBM

* djpeg

* Groff or Troff

* TeX/LaTeX

* Perl 4.0 patch level 36 or Perl 5 (Other versions not tested.)

* DVIPS

* plot2ps

* Transfig.

* GNU Texinfo

* Uncompress

* GZIP

=============================================================================
 CAP
=============================================================================

If you will be using PPR with CAP and you will be sharing more than about 10
printers using papsrv, you must change two values in a CAP library header 
file and re-compile the CAP library.

You should go to the directory "cap60/lib/cap" and edit the file "abpap.h". 
Change the values in the defines of NUMPAP and NUMSPAP from their normal
values of 12 and 10 respectively to something higher such as 70 and 70.
Once you have made the change you must re-compile and re-install the CAP
library by running "make install".

Starting with PPR version 1.20 you must also copy a header file from a
a CAP source directory to "/usr/include/netat".  The file is the one you may
have edited in the procedure described above, "cap60/lib/cap/abpap.h".

=============================================================================
 Netatalk and NATALI
=============================================================================

In order to use Netatalk with PPR you must first obtain and install NATALI, 
the Netatalk AppleTalk Library Interface compatibility library.  This
library, written by the author of PPR, may be obtained from the same place
you got PPR.

NATALI only works with Linux, though it is probably possible to port it to
other operating systems.

NOTE: be sure to read the README.txt file that comes with NATALI.  If you
don't follow the directions, there will be an unresolved symbol when you try
to link a program with NATALI and Netatalk.

=============================================================================
 DEC OSF/1
=============================================================================

Installing PPR on DEC OSF/1 systems is straightforward.  The only
required system modification is to insure that the System V STREAMS
based modules are built into the kernel.

You should find kernel configuration parameters in the file
/sys/conf/HOSTNAME.  Examine the file and determine if the following
lines are present.

options		STREAMS
options         FFM_FS
options         PCKT

If the above are present all the necessary components already in
place.  Otherwise, you will need to rebuild the OS kernel using
/usr/sbin/doconfig as root.  In the doconfig script you will be asked
to select kernel options.  Be sure to include the following: System V
Devices, STREAMS, and File on File Filesystem.  When doconfig finishes
copy the new kernel to /vmunix and reboot.

From this point on, you should be able to follow the usual PPR
installation procedures.  When you run Configure, it will give you
the option of using the C compiler that comes with the operating system.

=============================================================================
 X-Windows
=============================================================================

If your X-Windows distribution does not include xmessage but you have Tcl/Tk
then you can install the xmessage clone from the misc directory, probably in
the /usr/bin/X11 directory.  This script is not a perfect clone but it is
close enough for PPR.

Why using X-Windows you might want to set the environment variable
PPR_RESPONDER to "xwin" and PPR_RESPONDER_ADDRESS to the name of your
display.

=============================================================================
 The compiling steps are as follows:
=============================================================================

1) Become root.

2) Unpack the PPR source archive in a suitable place.
   "/usr/local/src" is good.  You can do this with these commands:

   mkdir /usr/local/src
   cd /usr/local/src
   gunzip -c ppr-src-1.30.tar.gz | tar -xvf -

3) Change directory to "ppr-1.30" and run "./Configure".

4) Run "make" and then "make install".

You may now continue with the installation procedure outlined in 
"Installing and Using PPR".  (Which basically is to run
"/usr/ppr/install/fixup".)

============================================================================
 Making a binary distribution archive
============================================================================

If you wish to make a binary distribution archive which may be copied
to other machines and installed, you should run "make bindist" after running
"make install" in step 7 above.  The archive will be created in the
directory above the one where you keep the PPR source.  It will be called
"ppr-bin.cpio.gz".

============================================================================
 Upgrading
============================================================================

If you are upgrading from PPR 1.00, 1.10, or 1.20 you should be able to just
install this version over the old one.  The old configuration files should
still work.  It would be a good idea though to backup your /etc/ppr tree
just in case.

Versions 1.20 and after provide default filter options which are prepended to
those supplied with the ppr -o switch.  The list of these options is stored
in the printer or group configuration file.  Pre-1.20 configuration files
won't have "DefFiltOpts:" lines.  To generate them, run these commands:

$ cd /etc/ppr/printers
$ for i in *
> do
> ppad deffiltopts $i
> done
$ cd /etc/ppr/groups
$ for i in *
> do
> ppad group deffiltopts $i
> done

This will generate a new "DefFiltOpts:" line in each printer and group
configuration file.


The groups which are used to grant PPR privledges also changed with version
1.20.  They did NOT change again with version 1.30.  This was the change:

The privledge of using the ppr -f switch to appear to be somebody else now
belongs to the members of "pprprox".  Previously the members of "ppr" could
also do this.

The privledge of making changes with ppop now belongs to the members of the
group "ppop" rather than "ppr".

The privledge of making changes with ppad now belongs to the members of the
group "ppad" rather than "ppradmin".


As of PPR version 1.30, the PPD file "HP LJ III Ghostscript" is called "HP
LaserJet III Ghostscript".  You are advised to delete the old one (which
will not have been removed) and use "ppad ppd" to change printers to use the
new one.


If you are using Samba, you can still use the pseudo-printcap method of
importing PPR printers, but the new method, described in the ppr2samba(8) man
page is better since it obviates the need to restart smbd after running
ppr2samba.


Because the name of the papsrv configuration file has changed, if you start
papsrv by commands in /etc/rc.local or /etc/rc.d/rc.local then you must
change the test for the presence of a papsrv configuration file.  Where it
previously said:

if [ -x /usr/ppr/bin/papsrv -a -r /etc/ppr/papsrv ]

it should now say:

if [ -x /usr/ppr/bin/papsrv -a -r /etc/ppr/papsrv.conf ]

If your system uses System V style init scripts (in addition to a System V
style init) then you don't have to do anything.  A new ppr start/stop script
will be installed.


This release will install a System V style init startup script for PPR on
some systems for which the previous version appended lines to rc.local.  If
the fixup script installs an init script on your system and finds evidence
of PPR startup code in rc.local it will alert you to that fact and recomend
that you removed the startup code from rc.local.


The format of the mfmodes.conf file changed slightly with version 1.30b7. 
It now has a new field which is compared to *DefaultResolution.


Starting with version 1.30b6, the default path for Ghostscript used by the
gs* interfaces is "/usr/bin/gs".  When upgrading, you will either have to
make sure that /usr/bin/gs is a link to /usr/local/bin/gs or vice versa or
use the new gs= interface option.  (That is, add "gs=/usr/local/bin/gs" to
the printer's options.


In 1.30b7 the interface "parallel" was renamed to "simple".  This is to
prepare for a new interface called "parallel" which will likely appear in
version 1.40.  The interface "gs" was also renamed, to "gssimple".  This is
in anticipation of an interface called "gsparallel" which is expected to
marginalize gssimple.


In the final version of 1.30, the PPD file "HP DeskJet 870C" was renamed "HP
DeskJet 550C".  The resolution was also corrected.  This reflects the fact that
Ghostscript does not yet support 600 dpi printing on the 870C.


============================================================================
 End of instructions for compiling PPR
============================================================================
