Add enums to hacking too.
[citadel.git] / citadel / techdoc / binaries.txt
1
2 BUILDING THE CITADEL SYSTEM WITH PRIVATE LIBRARIES
3 --------------------------------------------------
4
5 This method is known to work on Linux and FreeBSD systems.  It is a way of
6 building the Citadel system with its own private copies of Berkeley DB and
7 libical.  This avoids conflicts with any other version of these libraries
8 which may already exist on your host system.
9
10 You can perform your builds in any directory (such as /usr/src or even your
11 home directory).  The target directories will be:
12
13 * /usr/local/citadel           (Citadel server, text client, utilities)
14 * /usr/local/webcit            (the WebCit front end)
15 * /usr/local/ctdlsupport       (libical, libdb, and their headers, etc.)
16
17 The behavior of Easy Install is based upon this methodology.
18
19 1. Unpack the Berkeley DB tarball.  chdir to the "build_unix" directory
20    and build the package with these commands:
21  
22  ../dist/configure --prefix=/usr/local/ctdlsupport
23  make
24  make install
25
26 2. Unpack the libical tarball and build it with these commands:
27  
28  ./configure --prefix=/usr/local/ctdlsupport
29  make
30  make install
31  
32 3. Set these environment variables for the rest of the build.
33    (This assumes you're using the 'bash' shell.  Otherwise you're on your own.)
34  
35 export CFLAGS='-I/usr/local/ctdlsupport/include'
36 export CPPFLAGS='-I/usr/local/ctdlsupport/include'
37 export LDFLAGS='-L/usr/local/ctdlsupport/lib -Wl,--rpath -Wl,/usr/local/ctdlsupport/lib'
38  
39  -L tells the build system where to find libraries during the build process,
40 while -Wl,--rpath inserts that same library path into the Citadel binaries
41 so they know where to find the libs at runtime.  Since we can't depend on
42 the correct version of Berkeley DB already being on the system, this is how
43 we carry our own along.  It's better than static linking everything.
44
45 4. If LDAP support is required, unpack the OpenLDAP tarball and build with:
46
47 ./configure --prefix=/usr/local/ctdlsupport --with-db=/usr/local/ctdlsupport
48 make
49 make depend
50 make install
51
52 5. Now you're ready to build the Citadel server.  Unpack the Citadel tarball
53    and build it with these commands:
54
55 ./configure --prefix=/usr/local/citadel --with-db=/usr/local/ctdlsupport
56 make
57 make install
58  
59  ** NOTE: if you already have a Citadel server in /usr/local/citadel, change
60  the 'make install' to 'make upgrade'.  And I'm sure you remembered to shut
61  down your Citadel service and make a backup before starting, right?
62
63 6. Finally, unpack the WebCit tarball and build it with these commands:
64
65 ./configure --prefix=/usr/local/webcit
66 make
67 make install
68
69
70
71 All of your software is now in place.  Run /usr/local/citadel/setup to configure
72 the Citadel server, and /usr/local/webcit/setup to configure WebCit.  If you are
73 on a Linux machine, setup will tweak /etc/inittab to automatically start the
74 services.  If you are on a FreeBSD machine, you will need to manually configure
75 your startup scripts to start the services.