File: 2-building.html

package info (click to toggle)
epm 3.0-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,020 kB
  • ctags: 371
  • sloc: ansic: 6,199; cpp: 1,188; makefile: 201; perl: 134
file content (344 lines) | stat: -rw-r--r-- 9,427 bytes parent folder | download
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
<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 X11 libraries, and the FLTK library. FLTK is available at
the following URL:</P>

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

<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>

<BLOCKQUOTE><B>Note:</B><BR><BR> The <CODE>gzip</CODE> program
is only required to uncompress the software distribution
<VAR>.tar.gz</VAR> file.  If you supply the uncompressed
<VAR>.tar</VAR> file or its contents, then <CODE>gzip</CODE> is
not required on the end-user system.</BLOCKQUOTE>

<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>

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

<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>

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

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

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

<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 to another directory:</P>

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

<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:

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

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

<P>The setup GUI requires the X11 and FLTK libraries. If these
libraries are not provided in standard locations, then the
<CODE>--with-x-includes</CODE>, <CODE>--with-x-libs</CODE>,
<CODE>--with-fltk-includes</CODE>, and
<CODE>--with-fltk-libs</CODE> options can be used to tell the
<CODE>configure</CODE> script where to find them, as
follows:</P>

<UL><PRE>
<KBD>./configure --with-x-includes=/usr/X11R6/include \
    --with-x-libs=/usr/X11R6/lib \
    --with-fltk-includes=/usr/local/include \
    --with-fltk-libs=/usr/local/lib ENTER</KBD>
</PRE></UL>

<H2>Building the Software</H2>

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

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

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

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

<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:</CODE>

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

<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>

<UL><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/cat1 and /usr/man/man1
Installing EPM documentation in /usr/share/doc/epm
</PRE></UL>

<!-- NEW PAGE -->
<H3>Installing Using the Portable Distribution</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>

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

<P>The <CODE>os</CODE> name is the common name for the operating
system. Table 2.1 lists the abbreviations for most operating
systems:</P>

<CENTER><TABLE BORDER>
<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>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>

<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>The <CODE>architecture</CODE> string identifies the target
processor. Table 2.2 lists the supported processors:</P>

<CENTER><TABLE BORDER>
<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>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>Once you have determined the subdirectory containing the
distribution, type the following commands to install EPM from
the portable distribution:</P>

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

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

<!-- NEW PAGE -->
<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. Table 2.3 lists the
native formats for each supported operating system and the command
to run to install the software.</P>

<CENTER><TABLE BORDER>
<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-3.0.rpm</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>