File: 2-building.html

package info (click to toggle)
epm 4.2-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,812 kB
  • sloc: ansic: 11,090; cpp: 1,596; makefile: 303
file content (382 lines) | stat: -rw-r--r-- 10,000 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<HTML>
<BODY>

<H1 ALIGN="RIGHT"><A NAME="BUILDING">2 - Building EPM</A></H1>

<P>This chapter shows how to configure, build, and install the
ESP Package Manager.</P>

<H2>Requirements</H2>

<P>EPM requires very little pre-installed software to work. Most
items will likely be provided as part of your OS. Your
development system will need a C compiler, the
<CODE>make(1)</CODE> program (GNU, BSD, and most vendor
<CODE>make</CODE> programs should work), the Bourne (or Korn or
Bash) shell (<CODE>sh(1)</CODE>), and <CODE>gzip(1)</CODE>.</P>

<P>The optional graphical setup program requires a C++ compiler,
the FLTK library, version 1.1.x, and (for UNIX/Linux) the X11
libraries. FLTK is available at the following URL:</P>

<PRE>
    <A HREF="http://www.fltk.org/">http://www.fltk.org/</A>
</PRE>

<P>Your end-user systems will require the Bourne (or Korn or
Bash) shell (<CODE>sh</CODE>), the <CODE>df(1)</CODE> program,
the <CODE>tar(1)</CODE> program, and the <CODE>gzip(1)</CODE>
program to install portable distributions. All but the last are
standard items, and most vendors include <CODE>gzip</CODE> as
well.</P>

<P>EPM can also generate vendor-specific distributions.  These
require the particular vendor tool, such as <CODE>rpm(8)</CODE>
and <CODE>dpkg(8)</CODE>, to generate the software distribution
on the development system and load the software distribution on
the end-user system.</P>

<H2>Configuring the Software</H2>

<P>EPM uses GNU <CODE>autoconf(1)</CODE> to configure itself for
your system. The <CODE>configure</CODE> script is used to
configure the EPM software, as follows:</P>

<PRE>
    <KBD>./configure ENTER</KBD>
</PRE>

<H3>Choosing Compilers</H3>

<P>If the <CODE>configure</CODE> script is unable to determine
the name of your C or C++ compiler, set the <CODE>CC</CODE> and
<CODE>CXX</CODE> environment variables to point to the C and C++
compiler programs, respectively. You can set these variables
using the following commands in the Bourne, Korn, or Bash
shells:</P>

<PRE>
    <KBD>export CC=/foo/bar/gcc ENTER
    export CXX=/foo/bar/gcc ENTER</KBD>
</PRE>

<P>If you are using C shell or tcsh, use the following commands
instead:</P>

<PRE>
    <KBD>setenv CC /foo/bar/gcc ENTER
    setenv CXX /foo/bar/gcc ENTER</KBD>
</PRE>

<P>Run the <CODE>configure</CODE> script again to use the new
commands.</P>

<H3>Choosing Installation Directories</H3>

<P>The default installation prefix is <VAR>/usr</VAR>, which
will place the EPM programs in <VAR>/usr/bin</VAR>, the setup
GUI in <VAR>/usr/lib/epm</VAR>, and the man pages in
<VAR>/usr/man</VAR>. Use the <CODE>--prefix</CODE> option to
relocate these files</P>

<P>to another directory:</P>

<PRE>
    <KBD>./configure --prefix=/usr/local ENTER</KBD>
</PRE>

<P>The <CODE>configure</CODE> script also accepts the
<CODE>--bindir</CODE>, <CODE>--libdir</CODE>, and
<CODE>--mandir</CODE> options to relocate each directory
separately, as follows:

<PRE>
    <KBD>./configure --bindir=/usr/local/bin --libdir=/usr/local/lib \
        --mandir=/usr/local/share/man ENTER</KBD>
</PRE>

<H3>Options for the Setup GUI</H3>

<P>The setup GUI requires the FLTK library. The configure script
will look for the <CODE>fltk-config</CODE> utility that comes
with FLTK 1.1.x. Set the FLTKCONFIG environment variable to the
full path of this utility if it cannot be found in the current
path:</P>

<PRE>
    <KBD>setenv FLTKCONFIG /foo/bar/bin/fltk-config ENTER</KBD>
</PRE>

<P>or:</P>

<PRE>
    <KBD>FLTKCONFIG=/foo/bar/bin/fltk-config ENTER
    export FLTKCONFIG</KBD>
</PRE>

<H2>Building the Software</H2>

<P>Once you have configured the software, type the following
command to compile it:</P>

<PRE>
    <KBD>make ENTER</KBD>
</PRE>

<P>Compilation should take a few minutes at most. Then type the
following command to determine if the software</P>

<P>compiled successfully:</P>

<PRE>
    <KBD>make test ENTER</KBD>
    Portable distribution build test PASSED.
    Native distribution build test PASSED.
</PRE>

<P>The <CODE>test</CODE> target builds a portable and native
distribution of EPM and reports if the two distributions were
generated successfully.</P>

<H2>Installing the Software</H2>

<P>Now that you have compiled and tested the software, you can
install it using the <CODE>make</CODE> command or one of the
distributions that was created. You should be logged in as the
super-user unless you specified installation directories for
which you have write permission. The <CODE>su(8)</CODE> command
is usually sufficient to install software:</P>

<PRE>
    <KBD>su ENTER</KBD>
</PRE>

<P>Operating systems such as MacOS X do not enable the root
account by default. The <CODE>sudo(8)</CODE> command is used
instead:</P>

<PRE>
    <KBD>sudo <I>installation command</I> ENTER</KBD>
</PRE>

<!-- NEED 2in -->
<H3>Installing Using the <CODE>make</CODE> Command</H3>

<P>Type the following command to install the EPM software using the
<CODE>make</CODE> command:</P>

<PRE>
    <KBD>make install ENTER</KBD>
    Installing EPM setup in /usr/lib/epm
    Installing EPM programs in /usr/bin
    Installing EPM manpages in /usr/man/man1
    Installing EPM documentation in /usr/share/doc/epm
</PRE>

<P>Use the <CODE>sudo</CODE> command to install on MacOS X:</P>

<PRE>
    <KBD>sudo make install ENTER</KBD>
    Installing EPM setup in /usr/lib/epm
    Installing EPM programs in /usr/bin
    Installing EPM manpages in /usr/man/man1
    Installing EPM documentation in /usr/share/doc/epm
</PRE>

<H3><A NAME="INSTALL_PORTABLE">Installing Using the Portable
Distribution</A></H3>

<P>The portable distribution can be found in a subdirectory
named using the operating system, version, and architecture. For
example, the subdirectory for a Linux 2.4.x system on an
Intel-based system would be <VAR>linux-2.4-intel</VAR>. The
subdirectory name is built from the following template:</P>

<PRE>
    <I>os-major.minor-architecture</I>
</PRE>

<P>The <CODE>os</CODE> name is the common name for the operating
system. <A HREF="#TABLE_2_1">Table 2.1</A> lists the
abbreviations for most operating systems.</P>

<P>The <CODE>major.minor</CODE> string is the operating system
version number. Any patch revision information is stripped from
the version number, as are leading characters before the major
version number. For example, HP-UX version B.11.11 will result
in a version number string of <CODE>11.11</CODE>.</P>

<P>&nbsp;</P>

<CENTER><TABLE BORDER CELLPADDING="2">
<CAPTION><A NAME="TABLE_2_1">Table 2.1: Operating System Name Abbreviations</A></CAPTION>
<TR>
	<TH>Operating System</TH>
	<TH>Name</TH>
</TR>
<TR>
	<TD>AIX</TD>
	<TD><CODE>aix</CODE></TD>
</TR>
<TR>
	<TD>Compaq Tru64 UNIX<BR>
	Digital UNIX<BR>
	OSF/1</TD>
	<TD><CODE>tru64</CODE></TD>
</TR>
<TR>
	<TD>FreeBSD</TD>
	<TD><CODE>freebsd</CODE></TD>
</TR>
<TR>
	<TD>HP-UX</TD>
	<TD><CODE>hpux</CODE></TD>
</TR>
<TR>
	<TD>IRIX</TD>
	<TD><CODE>irix</CODE></TD>
</TR>
<TR>
	<TD>Linux</TD>
	<TD><CODE>linux</CODE></TD>
</TR>
<TR>
	<TD>MacOS X</TD>
	<TD><CODE>macosx</CODE></TD>
</TR>
<TR>
	<TD>NetBSD</TD>
	<TD><CODE>netbsd</CODE></TD>
</TR>
<TR>
	<TD>OpenBSD</TD>
	<TD><CODE>openbsd</CODE></TD>
</TR>
<TR>
	<TD>Solaris</TD>
	<TD><CODE>solaris</CODE></TD>
</TR>
</TABLE></CENTER>

<!-- NEED 3in -->
<CENTER><TABLE BORDER CELLPADDING="2">
<CAPTION><A NAME="TABLE_2_2">Table 2.2: Processor Architecture Abbreviations</A></CAPTION>
<TR>
	<TH>Processor(s)</TH>
	<TH>Abbreviation</TH>
</TR>
<TR>
	<TD>Compaq Alpha</TD>
	<TD><CODE>alpha</CODE></TD>
</TR>
<TR>
	<TD>HP Precision Architecture</TD>
	<TD><CODE>hppa</CODE></TD>
</TR>
<TR>
	<TD>INTEL 80x86</TD>
	<TD><CODE>intel</CODE></TD>
</TR>
<TR>
	<TD>INTEL 80x86 w/64bit Extensions</TD>
	<TD><CODE>x86_64</CODE></TD>
</TR>
<TR>
	<TD>MIPS RISC</TD>
	<TD><CODE>mips</CODE></TD>
</TR>
<TR>
	<TD>IBM Power PC</TD>
	<TD><CODE>powerpc</CODE></TD>
</TR>
<TR>
	<TD>SPARC<BR>
	MicroSPARC<BR>
	UltraSPARC</TD>
	<TD><CODE>sparc</CODE></TD>
</TR>
</TABLE></CENTER>

<P>&nbsp;</P>

<P>The <CODE>architecture</CODE> string identifies the target
processor. <A HREF="#TABLE_2_2">Table 2.2</A> lists the supported
processors.</P>

<P>Once you have determined the subdirectory containing the
distribution, type the following commands to install EPM from
the portable distribution:</P>

<PRE>
    <KBD>cd <I>os-major.minor-architecture<I> ENTER
    ./epm.install ENTER</KBD>
</PRE>

<P>The software will be installed after answering a few yes/no
questions.</P>

<H3>Installing Using the Native Distribution</H3>

<P>The <CODE>test</CODE> target also builds a distribution in the
native operating system format, if supported. <A
HREF="#TABLE_2_3">Table 2.3</A> lists the native formats for each
supported operating system and the command to run to install the
software.</P>

<!-- NEED 5in -->
<CENTER><TABLE BORDER CELLPADDING="2">
<CAPTION><A NAME="TABLE_2_3">Table 2.3: Native Operating System Formats</A></CAPTION>
<TR>
	<TH>Operating System</TH>
	<TH>Format</TH>
	<TH>Command</TH>
</TR>
<TR>
	<TD>AIX</TD>
	<TD><CODE>aix</CODE></TD>
	<TD NOWRAP><CODE>installp -d<I>directory</I> epm</CODE></TD>
</TR>
<TR>
	<TD>Compaq Tru64 UNIX<BR>
	Digital UNIX<BR>
	OSF/1</TD>
	<TD><CODE>setld</CODE></TD>
	<TD NOWRAP><CODE>setld -a <I>directory</I></CODE></TD>
</TR>
<TR>
	<TD>FreeBSD<BR>
	NetBSD<BR>
	OpenBSD</TD>
	<TD><CODE>bsd</CODE></TD>
	<TD NOWRAP><CODE>cd <I>directory</I><BR>
	pkg_add epm</CODE></TD>
</TR>
<TR>
	<TD>HP-UX</TD>
	<TD><CODE>depot</CODE></TD>
	<TD NOWRAP><CODE>swinstall -f <I>directory</I></CODE></TD>
</TR>
<TR>
	<TD>IRIX</TD>
	<TD><CODE>inst</CODE></TD>
	<TD NOWRAP><CODE>swmgr -f <I>directory</I></CODE></TD>
</TR>
<TR>
	<TD>Linux</TD>
	<TD><CODE>rpm</CODE></TD>
	<TD NOWRAP><CODE>rpm -i <I>directory</I>/epm-4.1.rpm</CODE></TD>
</TR>
<TR>
	<TD>MacOS X</TD>
	<TD><CODE>osx</CODE></TD>
	<TD NOWRAP><CODE>open <I>directory</I>/<CODE>epm-4.1.pkg</CODE></TD>
</TR>
<TR>
	<TD>Solaris</TD>
	<TD><CODE>pkg</CODE></TD>
	<TD NOWRAP><CODE>pkgadd -d <I>directory</I> epm</CODE></TD>
</TR>
</TABLE></CENTER>

</BODY>
</HTML>