Skip to content

Commit

Permalink
Next iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
muuki88 committed Dec 19, 2014
1 parent 758bc6d commit 6994400
Show file tree
Hide file tree
Showing 6 changed files with 396 additions and 115 deletions.
16 changes: 13 additions & 3 deletions src/sphinx/formats/debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The debian package specification is very robust and powerful. If you wish to do
the underlying packaging system works. http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/ is an excellent tutorial.

SBT Native Packager provides two ways to build debian packages. A native one, where you need ``dpkg-deb`` installed
or a java, platform independent approach with `jdeb <https://github.com/tcurdt/jdeb>`_. By default the _native_ implementation
or a java, platform independent approach with `jdeb <https://github.com/tcurdt/jdeb>`_. By default the *native* implementation
is activated.

.. contents::
Expand All @@ -23,7 +23,7 @@ is activated.
Requirements
------------

If you use the _native_ debian package implementation you need the following applications installed:
If you use the *native* debian package implementation you need the following applications installed:

* dpkg-deb
* dpkg-sig
Expand Down Expand Up @@ -76,7 +76,7 @@ If you want to use the java based implementation, enable the following plugin.
~~~~~~~~~~~~

For this versions debian packaging is automatically activated.
See the `Getting Started </GettingStarted>` page for informations
See the :doc:`Getting Started </gettingstarted>` page for informations
on how to enable sbt native packager.

If you want to enable `jdeb` packaging add the following to your `build.sbt`
Expand All @@ -86,6 +86,16 @@ If you want to enable `jdeb` packaging add the following to your `build.sbt`
packageBin in Debian <<= debianJDebPackaging in Debian
Configurations
--------------

Settings and Tasks inherited from parent plugins can be scoped with ``Debian``.

.. code-block:: scala
linuxPackageMappings in Debian := linuxPackageMappings.value
Settings
--------

Expand Down
12 changes: 11 additions & 1 deletion src/sphinx/formats/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,23 @@ Docker images require the following setting:
~~~~~

For this versions docker packaging is automatically activated.
See the `Getting Started </GettingStarted>` page for informations
See the :doc:`Getting Started </gettingstarted>` page for informations
on how to enable sbt native packager.

Configuration
-------------

Settings and Tasks inherited from parent plugins can be scoped with ``Docker``.

.. code-block:: scala
mappings in Docker := mappings.value
Settings
--------


Informational Settings
~~~~~~~~~~~~~~~~~~~~~~

Expand Down
74 changes: 73 additions & 1 deletion src/sphinx/formats/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ The native packager plugin is designed so that linux packages look similar, but

.. contents::
:depth: 2

.. raw:: html

<div class="alert alert-info" role="alert">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
The linux plugin dependens on the universal plugin. For universal settings read the
<a href="universal.html">Universal Plugin Documentation</a>
</div>

Related Plugins
---------------
Expand All @@ -22,6 +30,67 @@ Related Plugins
Build
-----

The linux plugin is just a top level plugin for linux packaging formats.
The ``Linux`` scope contains settings which can be used by the plugins
depending on the linux plugin.


.. code-block:: bash
sbt "show linux:linuxPackageMappings"
Required Settings
~~~~~~~~~~~~~~~~~

A linux package needs some mandatory settings to be valid. Make sure
you have these settings in your build:

.. code-block:: scala
name := "Linux Example"
version := "1.0"
maintainer := "Max Smith <max.smith@yourcompany.io>"
packageSummary := "Hello World Debian Package"
packageDescription := """A fun package description of our software,
with multiple lines."""
1.0 or higher
~~~~~~~~~~~~~

Enable the debian plugin to activate the native package implementation.

.. code-block:: scala
enablePlugins(LinuxPlugin)
0.8 or lower
~~~~~~~~~~~~

For this versions linux packaging is automatically activated.
See the :doc:`Getting Started </gettingstarted>` page for informations
on how to enable sbt native packager.

In order to use the utility functions you need to import them with
(if you haven't alreay imported this)

.. code-block:: scala
import com.typesafe.sbt.SbtNativePackager._
Configurations
--------------

Settings and tasks inherited from parent plugins can be scoped with ``Linux``.

.. code-block:: scala
name in Linux := name.value
Settings
--------
The required fields for any linux distribution are:
Expand All @@ -42,8 +111,11 @@ The required fields for any linux distribution are:
A list of files and their desired installation locations for the package, as well as other metainformation.


Customize
---------

Package Mappings
----------------
~~~~~~~~~~~~~~~~

Most of the work in generating a linux package is constructing package mappings. These 'map' a file to a location on disk where it should
reside as well as information about that file. Package mappings allow the specification of file ownership, permissions and whether or not
Expand Down
11 changes: 10 additions & 1 deletion src/sphinx/formats/rpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,18 @@ Enables the rpm plugin
~~~~~~~~~~~~

For this versions rpm packaging is automatically activated.
See the `Getting Started </GettingStarted>` page for informations
See the :doc:`Getting Started </gettingstarted>` page for informations
on how to enable sbt native packager.

Configuration
-------------

Settings and Tasks inherited from parent plugins can be scoped with ``Rpm``.

.. code-block:: scala
linuxPackageMappings in Rpm := linuxPackageMappings.value
Settings
--------

Expand Down
Loading

0 comments on commit 6994400

Please sign in to comment.