Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Numbered Headings

System Preparation

Requirements

To build all of the Moonshot components, you need various packages installed. To install all of these, see below.

Get the required packages on macOS El Capitan

To get all of the requirements on El Capitan, you will need to install Xcode, the Xcode command-line extensions, and several GNU tools:

  1. Add the Wheezy-backports repository.

    Install Xcode from the Mac App Store.

  2. Open a Terminal, then install the Xcode Command Line Tools.

    Code Block
    languagebash
    $ echo "deb http://ftp.us.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
  3. Refresh local package information

    Code Block
    $ apt-get update
  4. Install a whole load of packages from the normal Wheezy repo
    xcode-select --install

    You will be prompted with a dialog to install the Command Line Tools after a 130MB download.

  5. Install the GNU tools that are required for Moonshot by following the instructions at How to install Autoconf, Automake and related tools on Mac OS X from source?

     

  6. Install GNU GetText:

    Code Block
    languagebash
    $ apt-get install libxml-security-c-dev libxerces-c-dev libcurl4-openssl-dev liblog4cpp5-dev autotools-dev doxygen libtool libconfuse-dev autoconf automake python libsqlite3-dev libtalloc-dev fakeroot libkrb5-dev libevent-dev build-essential libboost-all-dev libxmltooling-dev liblog4shib-dev xmltooling-schemas autopoint libgtk2.0-dev libgee-dev libdbus-glib-1-dev valac libgnome-keyring-dev desktop-file-utils
    Install a package from the Wheezy-backports repo
    curl -O -L http://ftpmirror.gnu.org/gettext/gettext-latest.tar.gz
    $ tar -xzf gettext-latest.tar.gz
    $ cd gettext-*
    $ ./configure
    $ make && sudo install
  7. Install MacPorts by downloading the latest install package from MacPorts.org, then update it:

    Code Block
    languagebash
    $ sudo port -v selfupdate
  8. Install Makedepend from MacPorts:

    Code Block
    languagebash
    $ apt-getsudo port install -t wheezy-backports libsaml2-devmakedepend
  9. Update CPAN and install JSON:

    Code Block
    languagebash
    $ sudo cpan install JSON

Download the required dependencies:

 

Checkout the Moonshot source

The Moonshot source code is all stored in a GIT repository. To fetch it, issue the following command.

Code Block
languagebash
$ git clone --recursive http://www.project-moonshot.org/git/moonshot.git

Build Moonshot

To build Moonshot, simply enter the moonshot directory of the git repo that you just checked out, and run the builder script. In the --prefix option, you can specify where the code will be installed to. Note that you will need to build as a user who has permission to install in the target directory, because the builder script installs during the build, instead of doing an install after the build has finished (so you can't build first as an underprivileged user and install as a superuser as you would normally do).

Code Block
languagebash
$ cd moonshot && ./builder --prefix=/opt/moonshot

You probably know this, but if you stuck your installation into an unusual location, you may need to do the following (as root) - where, here, /opt/moonshot is the install path you used for the prefix option above:

Code Block
# echo /opt/moonshot/lib >/etc/ld.so.conf.d/moonshot.conf
# ldconfig

(TODO: document /etc/init.d/ stuff?)