Compiling on Linux

This page describes 3 different methods:

The instructions on this page describe how you compile the frePPLe source code into binaries. After compilation you need to return to the installation and configuration steps outlined on the previous page.

Compiling from a source tarball

This section describes the generic steps you need to build frePPLe from the source code. FrePPLe uses a very standard build process, based on the automake suite.

  1. Download the source code from http://sourceforge.net/projects/frepple/files/

    If you want to use source code directly from the github repository, you’ll need to replace this step with the instructions from the following section.

  2. Update your system with the development software packages.

    • gcc, v3.4 or higher
      Front end for the GNU compiler suite.
    • gcc-c++, compatible with gcc release
      GNU C++ compiler.
    • xerces-c, 3.0 or 3.1
      Xerces is a validating XML parser provided by the Apache Foundation.
      You need to install the libraries as well as the development libraries.
    • python v2.6 or v2.7
      Python is a modern, easy to learn interpreted programming language.
      You need to install the language as well as the development libraries.
  3. Configure the build with the following command:

    ./configure –sysconfdir=/etc

    You can use the option ‘–help’ to see the list of available options.

    The sysconfdir option is required to make sure the configuration files are always available under /etc, even when the package is compiled with a prefix such as /usr/local.

  4. Compile the source code:

    make all
  5. Run the test suite:

    make check

    Not all tests are currently passing, so you shouldn’t be worried about a couple of failures.

  6. Install the files:

    make install
  7. Free the disk space used during the build and test phases.

    make clean

Compiling from the github source code repository

To work with the source code directly from the github repository you will need the following steps to replace the first point in the section above.

  1. Update your machine with the following packages

    1. git
      Distributed version control tool.
    2. autoconf, v2.59 or later
      Gnu Autoconf produces shell scripts to automatically configure software source code packages. This makes the source code easier to port across platforms.
    3. automake, v1.9.5 or later
      Gnu Automake is a tool for automatically generating make-files.
    4. libtool, v1.5 or later
      Libtool hides the complexity of developing and using shared libraries for different platforms behind a consistent and portable interface.
    5. python-sphinx (optional)
      A modern documentation generation tool.
  2. Pick up the latest code from the repository with the command:

    git clone https://github.com/frePPLe/frePPLe.git <project_directory>
  3. Initialize the automake/autoconf/libtool scripts:

    cd <project_directory>
    make -f Makefile.dist prep
  4. Now the configure script is up to date and you can follow the same steps as in the section above.

  5. To sync your environment with the latest changes from the repository:

    cd <project_directory>
    git pull

Compiling from a debian source package

The steps to work with such packages are standard:

  1. Install the django package as described on the previous page.

  2. Install the dpkg-dev package and all prerequisite packages for frepple:

    apt-get install dpkg-dev debhelper cdbs autotools-dev python-dev libxerces-c-dev libtool python-sphinx
  3. Build the source directory.

    Expand all files listed in the .dsc file.

  4. Build the package in the source directory.

    dpkg-buildpackage -B
    

Compiling from a RPM source package

The steps to work with such packages are standard:

  1. Install the django package as described on the previous page.

  2. Install the rpmbuild package:

    yum install rpmbuild
  3. Create a build directory structure:

    rpmdev-setuptree
    
  4. Install the source RPM file:

    This will create files in the SOURCES directory of your RPM building directory tree, and a .spec file in the SPECS directory.

    rpm -i frepple-2.0-1.src.rpm
  5. Build the RPM:

    Go the SPECS directory and give the command to build the RPM:

    cd /home/your_userid/rpm/SPECS
    rpmbuild -bb frepple.spec