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 GNU/Linux distributions
82 GNU/Linux distributions like Debian 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 GNU/Linux release. The pspp version which is the default
85 version for a specific GNU/Linux distribution release are listed here:
86
87 @itemize
88 @item Debian:  @uref{https://packages.debian.org/pspp}
89 @end itemize
90
91 Debian stretch for example contains pspp 0.10.2. There are a number of
92 possibilities to update the pspp version inside a GNU/Linux distribution.
93
94 @subsection Backports
95
96 Sometimes a backport of a newer pspp version is available for an older
97 distribution. Instructions how to install backports
98 can be found here @uref{https://backports.debian.org/Instructions} for
99 Debian. This is the easiest way to have an updated version.
100
101 @subsection Building an updated pspp package
102
103 If you wish to use a newer pspp version than the one provided with
104 the GNU/Linux distribution or possibly a backport, then there is a good chance
105 that you can generate a new updated pspp package for your GNU/Linux distribution release
106 from the package source of a later GNU/Linux distribution release. The latest
107 pspp package for Debian is in sid (unstable). It is not advisable to
108 take a binary package from a later distribution because the interface to
109 the required libraries may have changed. Therefore you take the package
110 source instead of the package binary and then compile a new pspp package for your
111 GNU/Linux distribution.
112
113 Assume you want to create a new pspp package for Debian jessie. Jessie
114 has pspp version 0.8.4 as the default version. Assume that Debian unstable
115 contains the pspp version 1.0.1. Add the line
116 @example
117 deb-src http://ftp.debian.org/debian unstable main
118 @end example
119 to the file @code{/etc/apt/sources.conf}. This will make the package
120 sources of the packages in unstable available for apt-get.
121
122 Then download the pspp package sources from the unstable distribution.
123
124 @example
125 mkdir tmp
126 cd tmp
127 sudo apt-get update
128 apt-get source pspp/unstable
129 @end example
130
131 After this step you will have the files
132
133 @example
134 pspp_1.0.1-1.dsc
135 pspp_1.0.1-1.debian.tar.xz
136 pspp_1.0.1.orig.tar.gz
137 @end example
138
139 and the directory
140
141 @example
142 pspp-1.0.1
143 @end example
144
145 in your directory. Now you can install the package
146 dependencies with
147
148 @example
149 sudo apt-get build-dep pspp/unstable
150 @end example
151
152 And then you can build and test your pspp package with
153
154 @example
155 cd pspp-1.0.1
156 debuild -us -uc
157 cd ..
158 @end example
159 After this step you have the binary pspp package
160 @example
161 pspp_1.0.1-1_amd64.deb
162 @end example
163 in your directory and you can install the package with
164 @example
165 sudo dpkg -i pspp_1.0.1-1_amd64.deb
166 @end example
167 You can uninstall the package as usual with
168 @example
169 sudo apt-get remove pspp
170 @end example
171 This procedure is preferable vs. the @xref{InstallUnix, Plain Source Installation}
172 because the package and all data can be uninstalled the usual way and
173 the prerequisites can be installed the usual way via apt-get.
174
175 @anchor{BuildDevel}
176 @section Building a development version
177
178 The installation of development versions and building directly from git is
179 described here: @uref{https://www.gnu.org/software/pspp/get.html}.