Installing pspp
***************

The usual way to obtain pspp is described here: https://www.gnu.org/software/pspp/get.html. This appendix describes ways to update to newer released pspp versions. For building development versions: see Building Development Versions.

Installation in Unix Environment from Source
============================================

pspp is written in ISO C and primarily targeted at UNIX-like environments.  To install pspp under a UNIX-like operating system, follow the steps below.

 1. cd to the directory containing the pspp source.

 2. Type ./configure to configure for your particular operating system and compiler.  Running configure takes a while.  While running, it displays some messages telling which features it is checking for.

     You can optionally supply some options to configure to give it hints about how to do its job.  Type ./configure --help to see a list of options.

 3. Type make to compile the package.  If there are any errors during compilation, try to fix them.  If modifications are necessary to compile correctly under your configuration, contact the author. See Submitting Bug Reports, for details.

 4. Type make check to run self-tests on the compiled pspp package.

 5. Become the superuser and type make install to install the pspp binaries, by default in /usr/local/bin/.  The directory /usr/local/share/pspp/ is created and populated with files needed by pspp at runtime.  This step will also cause the pspp documentation to be installed in /usr/local/info/, but only if that directory already exists.

 6. (optional) Type make clean to delete the pspp binaries from the source tree.

More detailed instructions for building from source including the installation of required libraries can be found here: http://git.savannah.gnu.org/cgit/pspp.git/plain/INSTALL.

Updating the pspp package in GNU/Linux distributions
====================================================

GNU/Linux distributions like Debian make a release by taking the pspp package version which is in the rolling testing (sid) stage at the time of freezing the GNU/Linux release. The pspp version which is the default version for a specific GNU/Linux distribution release are listed here:

  * Debian:  https://packages.debian.org/pspp

Debian stretch for example contains pspp 0.10.2. There are a number of possibilities to update the pspp version inside a GNU/Linux distribution.

Backports
---------

Sometimes a backport of a newer pspp version is available for an older distribution. Instructions how to install backports can be found here https://backports.debian.org/Instructions for Debian. This is the easiest way to have an updated version.

Building an updated pspp package
--------------------------------

If you wish to use a newer pspp version than the one provided with the GNU/Linux distribution or possibly a backport, then there is a good chance that you can generate a new updated pspp package for your GNU/Linux distribution release from the package source of a later GNU/Linux distribution release. The latest pspp package for Debian is in sid (unstable). It is not advisable to take a binary package from a later distribution because the interface to the required libraries may have changed. Therefore you take the package source instead of the package binary and then compile a new pspp package for your GNU/Linux distribution.

Assume you want to create a new pspp package for Debian jessie. Jessie has pspp version 0.8.4 as the default version. Assume that Debian unstable contains the pspp version 1.0.1. Add the line

     deb-src http://ftp.debian.org/debian unstable main

to the file /etc/apt/sources.conf. This will make the package sources of the packages in unstable available for apt-get.

Then download the pspp package sources from the unstable distribution.

     mkdir tmp
     cd tmp
     sudo apt-get update
     apt-get source pspp/unstable

After this step you will have the files

     pspp_1.0.1-1.dsc
     pspp_1.0.1-1.debian.tar.xz
     pspp_1.0.1.orig.tar.gz

and the directory

     pspp-1.0.1

in your directory. Now you can install the package dependencies with

     sudo apt-get build-dep pspp/unstable

And then you can build and test your pspp package with

     cd pspp-1.0.1
     debuild -us -uc
     cd ..

After this step you have the binary pspp package

     pspp_1.0.1-1_amd64.deb

in your directory and you can install the package with

     sudo dpkg -i pspp_1.0.1-1_amd64.deb

You can uninstall the package as usual with

     sudo apt-get remove pspp

This procedure is preferable vs. the see Plain Source Installation because the package and all data can be uninstalled the usual way and the prerequisites can be installed the usual way via apt-get.

Building a development version
==============================

The installation of development versions and building directly from git is described here: https://www.gnu.org/software/pspp/get.html.