<commit_before>.. sidebar:: ToC

    .. contents::

.. _infra-manage-deploy:

Library and App releases
========================

There are three different "packaging targets":

#. a source package of the SeqAn library (``-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY``)
#. a package containing all apps (``-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS``)
#. a package containing a single SeqAn app (``-DSEQAN_BUILD_SYSTEM=APP:$appname``)

We assume that you have read :ref:`infra-use-install` and have cloned or unzipped the **full SeqAn sources** to ``~/devel/seqan`` (not the "library sources" described in other places).

The instructions for all packaging targets are the same (replace ``$pack_target`` with the above string):

.. code-block:: console

    ~ # mkdir -p ~/devel/seqan-build/deploy
    ~ # cd ~/devel/seqan-build/deploy
    deploy # cmake ../../seqan -DSEQAN_BUILD_SYSTEM=$pack_target -DSEQAN_OFFICIAL_PKGS=1
    deploy # make package

On Windows, replace the last command with

.. code-block:: console

    deploy # cmake --build . --target PACKAGE


This will create a ZIP-file and on unix also a tarball (`.tar.xz`) of the package.
``SEQAN_OFFICIAL_PKGS`` enables some optimizations on our official packages and also makes them static, i.e. they will not depend on external libraries (OpenMP, Zlib...).

.. note::

    Especially when creating packages, make sure that the cmake generator and/or compiler are the ones you want!

Downstream Packaging
--------------------

These are some guidelines for creating SeqAn packages for operating system specific packaging
systems, like *apt* (Debian/Ubuntu) or *rpm* (Fedora/RedHat/CentOS/SUSE).

Library Package
^^^^^^^^^^^^^^^

We recommend that downstream package maintainers provide one package named **seqan** that contains only the header-library and the api-docs and that is built from our *library packages* available here: http://packages.seqan.de

They have the advantage of not requiring any build steps, simply copy the ``include`` and ``share`` directories to the desired locations.

Application Package(s)
^^^^^^^^^^^^^^^^^^^^^^
<commit_msg>[DOC] update manual to reflect changes in build system<commit_after>.. sidebar:: ToC

    .. contents::

.. _infra-manage-deploy:

Library and App releases
========================

There are three different "packaging targets":

#. a source package of the SeqAn library (``-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_LIBRARY``)
#. a package containing all apps (``-DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS``)
#. a package containing a single SeqAn app (``-DSEQAN_BUILD_SYSTEM=APP:$appname``)

We assume that you have read :ref:`infra-use-install` and have cloned or unzipped the **full SeqAn sources** to ``~/devel/seqan`` (not the "library sources" described in other places).

The instructions for all packaging targets are the same (replace ``$pack_target`` with the above string):

.. code-block:: console

    ~ # mkdir -p ~/devel/seqan-build/deploy
    ~ # cd ~/devel/seqan-build/deploy
    deploy # cmake ../../seqan -DSEQAN_BUILD_SYSTEM=$pack_target -DSEQAN_STATIC_APPS=1 -DSEQAN_CPUOPT_SSE4=1
    deploy # make package

On Windows, replace the last command with

.. code-block:: console

    deploy # cmake --build . --target PACKAGE


This will create a ZIP-file and on unix also a tarball (``.tar.xz``) of the package.
For the official packages distributed by us we also set ``-DSEQAN_STATIC_APPS=1 -DSEQAN_CPUOPT_SSE4=1`` which means that  binaries contain optimizations and are built statically, i.e. they will not depend on external libraries (OpenMP, Zlib...). For downstream packages you will likely not want to set these options.

.. note::

    Especially when creating packages, make sure that the cmake generator and/or compiler are the ones you want!

Downstream Packaging
--------------------

These are some guidelines for creating SeqAn packages for operating system specific packaging
systems, like *apt* (Debian/Ubuntu) or *rpm* (Fedora/RedHat/CentOS/SUSE).

Library Package
^^^^^^^^^^^^^^^

We recommend that downstream package maintainers provide one package named **seqan** that contains only the header-library and the api-docs and that is built from our *library packages* available here: http://packages.seqan.de

They have the advantage of not requiring any build steps, simply copy the ``include`` and ``share`` directories to the desired locations.

Application Package(s)
^^^^^^^^^^^^^^^^^^^^^^

{'fraction_non_alphanumeric': 0.12700203022783668, 'fraction_numerical': 0.0015790660951951275, 'mean_word_length': 4.2785714285714285, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4256905', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1233, 'n_words': 510}