]> Dogcows Code - chaz/yoink/blob - doc/yoink_install.7
fixed documentation about where to find licenses
[chaz/yoink] / doc / yoink_install.7
1 .\"
2 .\" Copyright (c) 2009-2011, Charles McGarvey
3 .\" All rights reserved.
4 .\"
5 .\" Distributable under the terms and conditions of the 2-clause BSD
6 .\" license; see the file COPYING for a complete text of the license.
7 .\"
8 .Dd June 13, 2011
9 .Dt YOINK_INSTALL 7
10 .Os
11 .Sh NAME
12 .Nm yoink_install
13 .Nd building and installation instructions for yoink
14 .Sh DESCRIPTION
15 Yoink can usually be built and installed in the same way as most other open
16 source packages, using the following commands:
17 .Pp
18 .D1 cd /path/to/yoink
19 .D1 ./configure
20 .D1 make && make install
21 .Pp
22 Yet, although the build system scripts and makefiles follow standard
23 conventions, they are themselves a little unconventional. Therefore, if
24 things go wrong, this reference may aid in diagnosing the problem. The
25 rest of this page is for those for whom the basic steps do not work or for
26 those who have specialized needs, like packagers.
27 .Ss CONFIGURATION
28 A
29 .Nm configure
30 script is provided in the package to help prepare the build system to
31 compile and install Yoink on your particular system. This script supports
32 many of the same options as your typical Autoconf-generated script. Just
33 use the script's
34 .Fl -help
35 flag to see which options are available.
36 .Pp
37 In particular, you may use the
38 .Fl -prefix
39 flag to set where Yoink will be installed. The default directory prefix is
40 .Pa /usr/local Ns ,
41 which is a good idea in most cases, as long as you have write permissions
42 for that directory. Otherwise, you might want to set the prefix to be some
43 directory within your home directory.
44 .Pp
45 The script also supports the
46 .Fl -host
47 flag to allow for cross-compiling. Use this flag to set the triplet of the
48 machine architecture and system software combination for the platform you
49 want Yoink to run on. Of course, you will need the appropriate toolchain
50 installed.
51 .Pp
52 If you have
53 .Nm dialog
54 installed, an alternative approach to configuration is to use
55 .Cm menuconfig Ns ,
56 the interactive menu system built into the
57 .Nm configure
58 script. To use this method, there exists a familiar
59 .Nm make
60 target to bring up the menu dialogs:
61 .Pp
62 .D1 make menuconfig
63 .Pp
64 This is the same as running the
65 .Nm configure
66 script with the
67 .Fl -interactive
68 flag. This allows you to browse the various options and make changes to
69 the configuration before it is saved in preparation for building.
70 .Pp
71 Regardless of which way
72 .Nm configure
73 is run, it will perform various checks and make sure the required
74 dependencies are found. If all of the checks pass, the configuration file
75 is saved to
76 .Pa config.mk Ns ,
77 and the script will terminate with an exit code of 0. If any checks fail,
78 a non-zero exit code will result. The configuration file,
79 .Pa config.mk Ns ,
80 can be edited manually if desired. However, the
81 .Nm configure
82 script should be run again afterward to make sure the changes didn't cause
83 any errors, and the script may choose to alter any part of the
84 configuration.
85 .Pp
86 If any part of the configuration fails, make sure you have these basic
87 requirements fulfilled:
88 .Bl -enum
89 .It
90 You must have Lua installed. Much of the
91 .Nm configure
92 script is written in Lua, and Yoink requires Lua as a dependency anyway.
93 .It
94 You must have a working toolchain installed. This usually means you have
95 .Nm gcc
96 installed along with its C++ compiler components, libc and binutils.
97 .It
98 You must have
99 .Nm pkg-config
100 installed, along with the required library dependencies and \(lqpc\(rq
101 files. Look for these packages with your favorite package manager:
102 .Bl -bullet -compact
103 .It
104 boost headers
105 .It
106 libpng
107 .It
108 libvorbis
109 .It
110 Lua
111 .It
112 OpenAL
113 .It
114 OpenGL (including GLU)
115 .It
116 SDL
117 .It
118 zlib
119 .El
120 .El
121 .Ss BUILDING
122 Once the build system has been properly configured, it is ready to do some
123 compiling. This is done simply with an invocation of GNU make, perhaps
124 like this:
125 .Pp
126 .D1 make -j2
127 .Pp
128 Sometimes the command for GNU make is
129 .Nm gmake Ns ,
130 although it may also be simply
131 .Nm make Ns .
132 No other variety of
133 .Nm make
134 will work, and you need a fairly recent version of GNU make since some
135 older versions have fatal bugs. The
136 .Fl j
137 flag may be used to perform multiple build steps in parallel, decreasing
138 the amount of time the compile takes on multi-core machines. See
139 .Xr make 1
140 for more information.
141 .Pp
142 Advanced users may choose to override parts of the configuration with
143 additional arguments to
144 .Nm make Ns ,
145 although it is rarely useful to do so. However, in the event that some
146 error occurs during the process, it often is useful to retry the
147 .Nm make
148 command with the
149 .Ar V=1
150 argument (for verbosity) in order to cause
151 .Nm make
152 to echo each actual command before it is executed. Users who are familiar
153 with compiler and linker warnings and errors will then be able diagnose the
154 problem, whether it be a problem with the configuration or something else.
155 .Ss TESTING
156 After the build process has successfully completed, Yoink should now be
157 able to run from within the
158 .Pa build
159 directory, as long as you're not cross-compiling to an incompatible
160 platform. To test this, there is a
161 .Nm make
162 target to execute Yoink:
163 .Pp
164 .D1 make run
165 .Pp
166 If an error occurs and the rest of the build really did complete
167 successfully, the likely problem is that the dynamic libraries could not be
168 found. This may happen if the libraries are installed to a non-standard
169 location, and the linker wasn't given the appropriate
170 .Fl rpath
171 flag. This means that
172 .Nm pkg-config
173 failed to provide all of the flags we need. The easiest thing to do in
174 this situation is to reconfigure the build system with the
175 .Ar LDFLAGS=-Wl,-rpath=/path/to/lib
176 option set and retry the test (the executable will be rebuilt).
177 .Ss INSTALLATION
178 Once testing is completed, it is time to copy the Yoink files to their
179 final destinations. As usual, there is a
180 .Nm make
181 target to handle the installation:
182 .Pp
183 .D1 make install
184 .Pp
185 This will cause the files to be copied with the BSD-compatible
186 .Nm install
187 program. Of course, you may need to elevate your privileges (i.e. with
188 .Nm sudo Ns )
189 if you are installing to a directory your user account does not have write
190 access to.
191 .Pp
192 The installation destination depends on
193 .Ar prefix
194 and other configuration variables. You can override the configuration by
195 passing the arguments directly to
196 .Nm make
197 with the install target. The
198 .Pa Makefile
199 also supports staging by using the
200 .Ar DESTDIR
201 variable passed to
202 .Nm make Ns .
203 .Pp
204 Any failure during installation is probably a result of simply not having
205 sufficient privileges. It will also be a problem if you do not have a
206 BSD-compatible version of
207 .Nm install Ns .
208 In the case of the latter, it should be a minor modification to the
209 .Pa Makefile
210 to get it working. The build system is still not compatible in many
211 regards.
212 .Sh FILES
213 .Bl -tag -compact
214 .It Pa configure
215 .It Pa config.h
216 .It Pa config.mk
217 .It Pa config.sed
218 .It Pa Makefile
219 .It Pa options.lua
220 .El
221 .Sh SEE ALSO
222 .Xr yoinkrc 5 Ns ,
223 .Xr yoink 6
224 .Sh AUTHORS
225 .Bl -tag -width 2i -compact
226 .It An Charles McGarvey
227 .Mt chaz@dogcows.com
228 .El
This page took 0.038756 seconds and 4 git commands to generate.