Revert "GNU/Linux installation/update - Use GNU/Linux wording - Remove Ubuntu"
[pspp] / doc / installing.texi
1 @c PSPP - a program for statistical analysis.
2 @c Copyright (C) 2017 Free Software Foundation, Inc.
3 @c Permission is granted to copy, distribute and/or modify this document
4 @c under the terms of the GNU Free Documentation License, Version 1.3
5 @c or any later version published by the Free Software Foundation;
6 @c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
7 @c A copy of the license is included in the section entitled "GNU
8 @c Free Documentation License".
9 @c
10 @node Installation
11 @appendix Installing @pspp{}
12
13 The usual way to obtain pspp is described here:
14 @uref{https://www.gnu.org/software/pspp/get.html}. This appendix
15 describes ways to update to newer released pspp versions. For building
16 development versions: @xref{BuildDevel,,Building Development Versions}.
17
18 @anchor{InstallUnix}
19 @section Installation in Unix Environment from Source
20 @cindex installation
21 @cindex @pspp{}, installing
22
23 @cindex GNU C compiler
24 @cindex gcc
25 @cindex compiler, recommended
26 @cindex compiler, gcc
27 @pspp{} is written in ISO C and primarily targeted at UNIX-like
28 environments.  To install @pspp{} under a UNIX-like operating system,
29 follow the steps below.
30
31 @enumerate
32 @item
33 @code{cd} to the directory containing the @pspp{} source.
34
35 @cindex configure, GNU
36 @cindex GNU configure
37 @item
38 Type @samp{./configure} to configure for your particular operating
39 system and compiler.  Running @code{configure} takes a while.  While
40 running, it displays some messages telling which features it is checking
41 for.
42
43 You can optionally supply some options to @code{configure} to
44 give it hints about how to do its job.  Type @code{./configure --help}
45 to see a list of options.
46
47 @cindex compiling
48 @item
49 Type @samp{make} to compile the package.  If there are any errors during
50 compilation, try to fix them.  If modifications are necessary to compile
51 correctly under your configuration, contact the author.
52 @xref{Bugs,,Submitting Bug Reports}, for details.
53
54 @cindex self-tests, running
55 @item
56 Type @samp{make check} to run self-tests on the compiled @pspp{} package.
57
58 @cindex installation
59 @cindex @pspp{}, installing
60 @cindex @file{/usr/local/share/pspp/}
61 @cindex @file{/usr/local/bin/}
62 @cindex @file{/usr/local/info/}
63 @cindex documentation, installing
64 @item
65 Become the superuser and type @samp{make install} to install the
66 @pspp{} binaries, by default in @file{/usr/local/bin/}.  The
67 directory @file{/usr/local/share/pspp/} is created and populated with
68 files needed by @pspp{} at runtime.  This step will also cause the
69 @pspp{} documentation to be installed in @file{/usr/local/info/},
70 but only if that directory already exists.
71
72 @item
73 (optional) Type @samp{make clean} to delete the @pspp{} binaries
74 from the source tree.
75 @end enumerate
76
77 More detailed instructions for building from source including the
78 installation of required libraries can be found here:
79 @uref{http://git.savannah.gnu.org/cgit/pspp.git/plain/INSTALL}.
80
81 @section Updating the pspp package in Linux distributions
82 Linux distributions like Debian or Ubuntu make a release by taking the
83 pspp package version which is in the rolling testing (sid) stage at the
84 time of freezing the linux release. The pspp versions which are the default
85 version for a specific linux distribution release are listed here:
86
87 @itemize
88 @item Debian:  @uref{https://packages.debian.org/pspp}
89 @item Ubuntu: @uref{https://packages.ubuntu.com/pspp}
90 @end itemize
91
92 Debian stretch for example contains pspp 0.10.2. There are a number of
93 possibilities to update the pspp version inside a linux distribution.
94
95 @subsection Backports
96
97 Sometimes a backport of a newer pspp version is available for an older
98 distribution. Instructions how to install backports
99 can be found here @uref{https://backports.debian.org/Instructions} for
100 Debian. This is the easiest way to have an updated version.
101
102 @subsection Ubuntu PPA
103 For Ubuntu Adam Zammit maintains a PPA with several updates of pspp.
104 Installation via a PPA is similar to a backports install. See:
105 @uref{https://launchpad.net/~adamzammit/+archive/ubuntu/pspp}.
106
107 @subsection Building an updated pspp package
108
109 If you wish to use a newer pspp version than the one provided with
110 the distribution or possibly a backport, then there is a good chance
111 that you can generate a new updated pspp package for your linux distribution release
112 from the package source of a later distribution release. The latest
113 pspp package for Debian is in sid (unstable). It is not advisable to
114 take a binary package from a later distribution because the interface to
115 the required libraries may have changed. Therefore you take the package
116 source instead of the package binary and then compile a new pspp package for your
117 linux distribution.
118
119 Assume you want to create a new pspp package for Debian jessie. Jessie
120 has pspp version 0.8.4 as the default version. Assume that Debian unstable
121 contains the pspp version 1.0.1. Add the line
122 @example
123 deb-src http://ftp.debian.org/debian unstable main
124 @end example
125 to the file @code{/etc/apt/sources.conf}. This will make the package
126 sources of the packages in unstable available for apt-get.
127
128 Then download the pspp package sources from the unstable distribution.
129
130 @example
131 mkdir tmp
132 cd tmp
133 sudo apt-get update
134 apt-get source pspp/unstable
135 @end example
136
137 After this step you will have the files
138
139 @example
140 pspp_1.0.1-1.dsc
141 pspp_1.0.1-1.debian.tar.xz
142 pspp_1.0.1.orig.tar.gz
143 @end example
144
145 and the directory
146
147 @example
148 pspp-1.0.1
149 @end example
150
151 in your directory. Now you can install the package
152 dependencies with
153
154 @example
155 sudo apt-get build-dep pspp/unstable
156 @end example
157
158 And then you can build and test your pspp package with
159
160 @example
161 cd pspp-1.0.1
162 debuild -us -uc
163 cd ..
164 @end example
165 After this step you have the binary pspp package
166 @example
167 pspp_1.0.1-1_amd64.deb
168 @end example
169 in your directory and you can install the package with
170 @example
171 sudo dpkg -i pspp_1.0.1-1_amd64.deb
172 @end example
173 You can uninstall the package as usual with
174 @example
175 sudo apt-get remove pspp
176 @end example
177 This procedure is preferable vs. the @xref{InstallUnix, Plain Source Installation}
178 because the package and all data can be uninstalled the usual way and
179 the prerequisites can be installed the usual way via apt-get.
180
181 @anchor{BuildDevel}
182 @section Building a development version
183
184 The installation of development versions and building directly from git is
185 described here: @uref{https://www.gnu.org/software/pspp/get.html}.