= Installing the DocBook Authoring and Publishing Suite (DAPS)

:numbered:

== Tested Distributions

DAPS has been tested on the following Linux distributions. It should also run
on any other distribution, feedback is welcome.

* Debian Jessie (8.5.0)
* Fedora 23
* Linux Mint 18.1
* openSUSE 13.* and Leap 42.*
* SUSE Linux Enterprise 12 (incl. service packs)
* Ubuntu 16.04

== Pre-build Packages

Pre-build packages are available for openSUSE and Ubuntu from the following
repositories:

SUSE::
	http://download.opensuse.org/repositories/Documentation:Tools/ +
	Browse to this URl and choose you SUSE version to get the complete
	 repository URl and add it with the `zypper ar` command, for example:
	`zypper ar -f http://download.opensuse.org/repositories/Documentation:Tools/openSUSE_Leap_42.2 Documentation:Tools`
	 To be able to use the complete functionality of DAPS, make sure to
	also install all recommended packages (`zypper in --recommends --from Documentation:Tools daps`)
////	 
Ubuntu::
	https://launchpad.net/~sascha-manns-h/+archive/ubuntu/daps/ +
	 (follow the instructions on this page for adding the PPA)
////
Debian, Fedora, Ubuntu::
	Not available, yet. Help is appreciated.

The package is named +daps+. Additional packages needed by DAPS will
automatically be installed.


== Installing DAPS


DAPS can be installed either from a downloaded release or from the GitHub
checkout. (Alternatively you may use the latest development version
by using a repository clone directly without installing--see
<<anchor-2>>. However, this is not recommended for production use).

[[anchor-1]]
=== Prerequisites

DAPS only runs on Linux and is not compatible with other operating systems.
DAPS requires a few programs to be installed on your system. To use the full
feature set of DAPS, make sure to also install the optional packages. If
unsure, which DAPS' features are supported with your current installation,
just run `./configure --sysconfdir=/etc` in the DAPS checkout directory. It
will output detailed information about the support status on your system.

.*Required packages*
[options="header"]
|====
|SUSE                     |Debian/Ubuntu               |Fedora                  
|automake                 |autotools-dev               |automake
|dia                      |dia                         |dia
|docbook_4                |docbook                     |docbook-dtds
|--                       |docbook-xml                 |--
|docbook-xsl-stylesheets^1^ |docbook-xsl^*^            |docbook-style-xsl^1^
|ImageMagick              |imagemagick                 |ImageMagick
|ghostscript              |ghostscript                 |ghostscript
|inkscape                 |inkscape                    |inkscape
|libxml2-tools            |libxml2-utils               |libxml2
|--                       |libxml-commons-external-java|--
|--                       |libxmlgraphics-commons-java |--
|libxslt-tools            |--                          |libxslt
|make                     |make                        |make
|poppler-tools            |poppler-utils               |poppler-utils
|python-xml               |python-libxml2              |libxml2-python
|python-lxml              |python-lxml                 |python-lxml
|sgml-skel                |sgml-base                   |sgml-common
|svg-dtd                  |sgml-data                   |?
|w3m                      |w3m                         |w3m
|xml-commons-jaxp-1.3-apis|   --                       |xml-commons-apis
|xmlgraphics-fop^2^      |fop^2^                     |fop^2^
|xmlstarlet               |xmlstarlet                  |xmlstarlet
|--                       |xsltproc                    |--
|zip                      |zip                         |zip
|====

 ^1^: minimum version: 1.7.8
 ^2^: minimum version: 0.96, 1.x is recommended


.*Required Packages for DocBook 5 Support*
[options="header"]
|====
|SUSE                    |Debian/Ubuntu           |Fedora                   
|docbook_5               |docbook5-xml            |docbook5-schemas
|docbook5-xsl-stylesheets|docbook-xsl-ns          |docbook5-style-xsl
|jing                    |jing                    |jing
|====

.*Optional packages*
[options="header"]
|====
|SUSE                    |Debian/Ubuntu           |Fedora                   
|aspell                  |aspell                  |aspell
|epubcheck               |epubcheck               |?
|exiftool                |libimage-exiftool-perl  |perl-Image-ExifTool
|optipng                 |optipng                 |optipng
|perl-checkbot           |checkbot                |?
|remake                  |remake                  |n/a^3^
|saxon6                  |libsaxon-java           |?
|saxon6-scripts          |--                      |?
|xmlformat               |xmlformat-perl          |?
|transfig                |xfig                    |xfig
|====

^3^ The existing remake package on Fedora is a different software.

In case you want to install the optional packages at a later point in time,
run `daps-check-deps` to check for already installed and missing dependencies.

=== Installation

1. Download the https://github.com/openSUSE/daps/releases/latest[latest DAPS version]
archive and unpack it _or_, alternatively clone the master branch from GitHub: +
   `git clone https://github.com/openSUSE/daps.git -b master --single-branch` 
2. Change into the daps directory
3. Run `./configure --sysconfdir=/etc` +
   Carefully check the configuration summary. Run `./configure --help` for
   more information on how to change installation paths. If you need to change
   something, re-run the configure command again afterwards.
4. Run `make`   
5. Run `sudo make install`
6. Run `daps --help` for a brief introduction in DAPS

[[anchor-2]]
== Running DAPS from a GitHub Checkout

In case you do not want to install DAPS or always would like to use the latest
development version, you can run DAPS directly from the GitHub checkout.

1. Make sure the prerequisites listed in <<anchor-1>> are fullfilled.
2. Check out DAPS. Either choose the latest stable version (safe) or the
   development version (may not work)
   Checking out the latest release::
	`git clone https://github.com/openSUSE/daps.git -b master --single-branch`
   Checking out the latest development version::
	 `git clone https://github.com/openSUSE/daps.git`
3. (Skip this step for SUSE). Go to the checkout dicrectory and enter the
   following command according to your distribution:
   Debian/Ubuntu::
	`./configure --sysconfdir=/etc` +
	`make debian`
   Fedora/RedHat::
   	`./configure --sysconfdir=/etc` +
	`make redhat`
   SUSE::
	_Do nothing_
4. Test DAPS by building the DAPS user manual: +
   `cd <path_to_checkout>/daps/doc` +
   `../bin/daps --dapsroot .. -d DC-daps-user pdf`

To run DAPS from the checkout directory, enter the following command: +
`<path_to_checkout>/bin/daps --dapsroot=<path_to_checkout>
[options] <subcommand> [options]`
