This directory holds the Debian source packaging for `try`, used to build and
publish the package to a PPA. Its build logic is independent of the rest of
`packaging/`, which builds the `.deb`/`.rpm` attached to GitHub Releases; the
two don't share anything.

It lives here rather than at the repo root purely to keep the top level
tidy. To build or test locally first run:
```sh
cp -R packaging/debian debian
```

# Building
With `debian/` staged at the repo root as above, `dpkg-buildpackage -S`
builds a source package. CI (`ppa-source-check` in
`.github/workflows/test.yaml`) does this on every tag push and lints the
result with `lintian`; `publish-ppa` signs and uploads it to the configured
PPA via `dput`.

# Versioning

You don't edit `debian/changelog` for a normal release. CI takes the
upstream version from the release tarball and compares it with the top
entry of the committed changelog:

* Different (a new upstream release): CI starts at revision 1 and adds a
  "New upstream release" entry itself.
* Same (a packaging-only fix, e.g. a `debian/control` change): CI keeps the
  committed revision, so bump it by hand (`0.2.1-1` to `0.2.1-2`) in the PR
  that makes the fix.

# Supported Ubuntu series

CI builds and uploads one source package per Ubuntu series, listed in the
`matrix.series` of `ppa-source-check` in `.github/workflows/test.yaml`
(currently `focal`, `jammy`, `noble`). Each upload gets its own version
(`<version>-<revision>~<series>1`, e.g. `0.2.1-1~focal1`), because a PPA
won't accept the same version twice; the `.orig.tar.gz` is shared and
byte-identical across them.

`debian/control` uses `debhelper-compat (= 12)` rather than 13 because
focal (20.04) ships debhelper 12.10, which can't satisfy 13. Raise it only
if focal is dropped.

# Testing that a published PPA package actually installs and works

Once a build succeeds on Launchpad, verify it installs cleanly in an
isolated environment:

```sh
docker run -it --rm ubuntu:24.04 bash
```

```sh
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:yourusername/try
apt-get update
apt-get install -y try

try -v
man try
```
