1 konrad.r 1.1 Compiling Pegasus to be Linux Standard Base compliant.
2
3
4 Author: Konrad Rzeszutek <konradr@us.ibm.com> Jun 29 2004
5
6
7 Required software
8 -----------------
9
10 The following software is required to build lsb-pegasus:
11
12 lsbdev-base >= 1.3.4-1
13 lsb >= 1.3.0-1
14 lsbdev-c++ >= 1.3.4-1
15 lsbappchk >=1.3.3-1
16 lsbdev-cc >= 1.3.0-1
17 lsblibchk >= 1.3.5-1
18 gcc >= 3.2.2
19 make >= 3.7x
20 pam-devel >= 0.75
21 openssl >= 0.9.7d
22 konrad.r 1.1 nALFS >= v020310
23
24 Build
25 -----------
26
27
28 There are two ways of building. The semi-automated way (no
29 environment variables) or the manual method (must set
30 environment variables).
31
32
33 1). Without environment variables
34
|
35 konrad.r 1.2 First time run the ./Configure to set the proper
|
36 konrad.r 1.1 paths and platform information. In most cases the script
37 will automatically determine the correct paths and configuration.
38
39 Note:
40 The information is saved in config.status in case you want
41 to redo it in the future.
42
43 Next start the build process using nALFS. From nALFS README
44 file, nALFS is "used for parsing the ALFS profiles (simple
45 XML files) and, following those profiles, do various things
46 (like executing commands), one by one, to (usually) compile some packages."
47
48 nALFS webpage is http://www.linuxfromscratch.org/alfs/
49
50 To invoke the build process, provide the lsb-pegasus.xml file:
51
52 $nALFS -i -v -l rpm/lsb-pegasus.xml
53
54 After the compilation is done, to build the RPM binary file:
55
56 $rpmbuild -ba rpm/lsb-pegasus.spec
57 konrad.r 1.1
58 And you are done.
59
60
61 2). With environment variables
62
63 For more information on each of the environment variables, please
64 refer to the README file.
65
66 You need to set twelve environment variables: CC, CXX, LSBCC_SHAREDLIBS,
67 PEGASUS_PAM_AUTHENTICATION, PEGASUS_USE_PAM_STANDALONE_PROC,
|
68 h.sterling 1.3 PEGASUS_HAS_SSL, PEGASUS_USE_RELEASE_DIRS,
|
69 konrad.r 1.1 PEGASUS_LSB, PEGASUS_HOME, PEGASUS_ROOT, and PEGASUS_PLATFORM.
70
71 The first two define that a LSB compiler should be used:
72
73 export CC=lsbcc
74 export CXX=lsbc++
75
76 And LSBCC_SHAREDLIBS tells LSB that OpenPegasus shared
77 libraries are OK to compile with:
78
79 export LSBCC_SHAREDLIBS=pegcommon:pegconfig:pegrepository:pegcompiler:peggetoopt:pegcliutils
80
81 The next two make OpenPegasus compile with PAM authentication:
82
83 export PEGASUS_PAM_AUTHENTICATION=1
84 export PEGASUS_USE_PAM_STANDALONE_PROC=1
85
86 ,to support SSL:
87
88 export PEGASUS_HAS_SSL=1
89
90 konrad.r 1.1 And very importantly the LSB flag which determines that
91 OpenPegasus is compiled against an LSB compliant system:
92
93 export PEGASUS_LSB=1
94
95 Also, two env to determine location of compiled binaries and
96 the source, respectively:
97
98 export PEGASUS_HOME=`pwd`/BINARIES
99 export PEGASUS_ROOT=`pwd`
100
101 Lastly, what platform it is compiled on:
102
103 export PEGASUS_PLATFORM=LINUX_IX86_GNU
104
105 When all of those environment variables are set, you can
106 compile the code, as so:
107
108
109 $make
110
111 konrad.r 1.1 When the compilation is done, you have to pick the directory
112 where the binary will be temporarily put to build an RPM. In
113 the example, we picked the path /home/konrad/MAIN/pkgroot.
114
115 $make PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/opt/lsb-pegasus \
|
116 h.sterling 1.3 SYSCONF_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/ \
117 LOCAL_STATE_PREFIX=/home/konrad/MAIN/pkgroot/lsb-pegasus/var/opt/lsb-pegasus/ \
118 DEST_ETC_DIR=/home/konrad/MAIN/pkgroot/lsb-pegasus/etc/opt/lsb-pegasus install
|
119 konrad.r 1.1
120 To build the RPM, you have to change in the rpm/lsb-pegasus.spec
121 the BuildRoot path to be what you choose previously.
122
123 Change accordingly, in our case, the BuildRoot will be:
124 BuildRoot: /home/konrad/MAIN/pkgroot
125
126 Lastly the RPM build process:
127
128 $rpmbuild -b rpm/lsb-pegasus.spec
129
130 And the OpenPegasus LSB compliant package is built.
131
|