# Debian Package Build

## Introduction

This project contains a tool to help creating Debian Packages. dpb
allows to build and rebuild a git project into a Debian package in a
clean and discartable environment. By bootstrapping the environment,
this assures that the dependencies are correct and the code is compiled
within the correct environment.

## How to Build

Note, running tpb should be done in the directory containing the
'debian' directory. It is preferred that this is the top level git
project location, though the tool has been adjusted to allow operating
if this is not the case (e.g. not a git location or the top git location
is further upwards).


A number of examples:

* Build the local environment. Do not upload.

```shell
$ debian-package-build
```

* Build the local environment, tag the build with a new version and
generate the correct changelog (consisting out of the short git messages)

```shell
$ debian-package-build -c
```

* Build the local environment, do not upload, but build for 32-bit
(when the host is 64 bit)

```shell
$ debian-package-build -a i386
```

* Build the local environment, build for Debian 9 (default is Debian 10
at the time of writing)

```shell
$ debian-package-build -r stretch
```

It is also possible to upload complex packages without compiling them locally:

```shell
$ debian-package-build -uc --source-only
```

## Profiles

The script uses _profiles_ to build for different Debian distributions. At
the moment of writing, The profiles for ubuntu and Debian are available
(Debian is the default).

Build for ubuntu:

```
$ debian-package-build --profile=ubuntu
```

There are also short-hand wrappers to use for Ubuntu and Debian:

```
$ upb
$ dpb
```
