Debian Ubuntu Building From Source

From Scribus Wiki
Jump to navigation Jump to search

Build Scribus from source on Debian, Ubuntu, and other Debian derivatives


Add the deb-src line appropriate for your distribution or whatever is closest to it as shown in Debian to the '/etc/apt/sources.list' file on your system.

Build dependencies

If you only want to know how to get the libraries and packages needed to build Scribus then the following command is the only one you should need to know:

sudo apt-get build-dep scribus-ng

On a fresh ubuntu, this gives no result. So if that's not enought, depending on the error message you got when compiling, you will have to install other libraries. In my experience, Ubuntu Software center is of no help and to find and get these you'll have to use synaptic :

  • qt4-dev-tools package and dependencies are required when a QT related errors happens, such as "missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_LIBRARY"
  • libghc6-zlib-dev package and dependencies are required when a zlib related error happens such as "missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR"
  • libpng12-dev package and dependencies are required when "missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR"
  • libjpeg12-dev package and dependencie are required when "missing: JPEG_LIBRARY JPEG_INCLUDE_DIR"
  • libjtiff4-dev package and dependencie when "missing: TIFF_LIBRARY TIFF_INCLUDE_DIR"
  • python-dev package and dependencie when "missing: PYTHON_INCLUDE_DIRS"
  • libfreetype-dev and dependencies when "missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS"
  • libcairo2-dev and dependencies when "None of the required 'libcairo>=1.2.0;cairo>=1.2.0' found"
  • libcups2-dev and dependencies when "Could NOT find Cups"
  • libxml++2.6-dev etc when "missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR"
  • liblcms1-dev etc when " Could not find LittleCMS"

Rebuilding an existing source package

This is usually needed when your release or achitecture does not have a pre-built package, but your needs may vary.'

sudo apt-get build-dep scribus-ng
sudo apt-get source scribus-ng
cd scribus-ng-.....(whatever the directory is)
sudo debuild -us -uc

Creative builds

If you have more complex needs such as using alternative developmental libraries Scribus depends upon or changing the build setup.

  • Get the build dependencies and a source package as above.
  • See the "debian/rules" file for the complete build set up used for the official Debian/Ubuntu package. Right now (Mar 2011) the official setup for an out of tree build is as follows:
cmake \
-DCMAKE_C_FLAGS:STRING='$(OPT_FLAG)' scribus-ng-1.4.0

If you are doing your own builds you should be able to ascertain what the above means.