3. Installation from source

XULRunner version 10 or later is required for the CF Engine to operate. If the platform does not have XULRunner 10 as a package it must be compiled and installed. The native package for XULRunner - if such a package exist - depends on the platform.

When building XULRunner from scratch there are two choices: a manual process where each component is installed separately or an automatic way using the Makefile xulrunner.mk. Proceed to either Section 3.1, “Using xulrunner.mk” or Section 3.2, “Manual compilation of XULRunner and Index Data Tools”.

3.1. Using xulrunner.mk

The CF engine source includes a Makefile, xulrunner.mk, which may be used to download, compile and install XULRunner 10 (or later), GTK and all necessary components for XULRunner and in turn CF to run.

The first thing to do is to determine an installation prefix. Most often the prefix is specified with --prefix=PREFIX in configure-based programs. Most stuff will be installed below the PREFIX, .. binaries in PREFIX/bin, libraries in PREFIX/lib, etc.

Specify the PREFIX in the xulrunner.mk by editing it or set it with suffix prefix= in the invokation of make.

       cd buildarea  # with at least 1.4 GB of disk space
       vi pathto/xulrunner.mk # edit prefix
       make -f xulrunner.mk
      

xulrunner.mk needs no source from the CF repository .. Just pass the proper path to xulrunner.mk (of course).

3.2. Manual compilation of XULRunner and Index Data Tools

Note

It is much easier to use xulrunner.mk as described in Section 3.1, “Using xulrunner.mk” than following these steps.

We recommend that you specify this prefix in the environment:

       export P=prefix   # for example $HOME/myprefix
      

The example above is Bash shell notation. For Bourne Shell use

       P=prefix
       export P
      

And for csh/tcsh use:

       setenv P prefix
      

The rest of this chapter will only show bash notation.

When this is set, define these as well so that pkg-config can find our tools inside PREFIX:

       export PKG_CONFIG_PATH=$P/lib/pkgconfig
      

On SUSE Linux Enterprise there's some stuff we need in /opt/gnome/lib64/pkgconfig .. So, instead, use:

       export PKG_CONFIG_PATH=$P/lib/pkgconfig:/opt/gnome/lib64/pkgconfig
      

We need to tell the system about new location for .so-files:

       export LD_LIBRARY_PATH=$P/lib
      

And some new binaries .. such as glib-genmarshal:

       export PATH=$P/bin:$PATH
      

YAZ: Get it from http://ftp.indexdata.dk/pub/yaz/

       cd yaz-*
       ./configure --prefix=$P
       make install
       

YAZ++: Get it from http://ftp.indexdata.dk/pub/yazpp/

       cd yazpp-*
       ./configure --prefix=$P
       make install
       

Boost: is usually available on most platforms in the form of native packages (RPM, Debian, Windows installer) etc.. Only as a last resort compile it manually from source.

Get source from http://www.boost.org/users/download/ .

Metaproxy: Get it from http://ftp.indexdata.dk/pub/metaproxy/

       cd metaproxy-*
       ./configure --prefix=$P
       make install
       

Refer to the Metaproxy documentation for more details.

pixman: Get it from http://www.cairographics.org/releases/

       cd pixman-*
       ./configure --prefix=$P
       make install
      

Cairo: Get it from http://www.cairographics.org/releases/

       cd cairo-*
       ./configure --prefix=$P
       make install
      

GLIB: Get it from http://ftp.gnome.org/pub/gnome/sources/glib/

       cd glib-*
       ./configure --prefix=$P
       make install
      

Atk: Get it from http://ftp.gnome.org/pub/gnome/sources/atk/

       cd atk-*
       ./configure --prefix=$P
       make install
       

Pango: Get it from http://ftp.gnome.org/pub/gnome/sources/pango/

       /configure --prefix=$P
       make install
      

GTK2: Get it from http://ftp.gnome.org/pub/gnome/sources/gtk+/

       cd gtk+-*
       make install
      

XULRunner: Get one of the XULRunner 10 series. The official releases can be found here: http://ftp.mozilla.org/pub/mozilla.org/mozilla.org/xulrunner/releases/.

There are several pages on developer.mozilla.org.. Such as the Build Options .

       tar jxf xulrunner-10.*bz2
       cd mozilla
       vi .mozconfig
         # Add something like this:
         ac_add_options --enable-application=xulrunner
         mk_add_options MOZ_CO_PROJECT=xulrunner
         ac_add_options --enable-optimize
         ac_add_options --disable-debug
         ac_add_options --disable-javaxpcom
         ac_add_options --disable-printing
         ac_add_options --disable-dbus
         ac_add_options --disable-crashreporter
       ./configure --prefix=$P
       make
       make install
      

Developers might use the directives --disable-optimize, --enable-debug instead of --enable-optimize.