packaging: fix and tidy up the Debian packaging

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2025-08-04 10:47:14 +03:00
parent 758dde8f5c
commit 752c9fbb59
5 changed files with 58 additions and 4 deletions
Vendored Executable
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -euo pipefail
rm -f ../radicle*_*
git clean -fdx
# Get name and version of source package.
name="$(dpkg-parsechangelog -SSource)"
version="$(dpkg-parsechangelog -SVersion)"
# Get upstream version: everything before the last dash.
uv="$(echo "$version" | sed 's/-[^-]*$//')"
orig="${name}_${uv}.orig.tar.xz"
# Create a tar ball without the Debian packaging.
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
git archive HEAD | tar -C "$tmp" -xf -
rm -rf "$tmp/debian"
tar -C "$tmp" -cf - . | xz >"../$orig"
# Actually build the package, without signing the .changes file.
dpkg-buildpackage -us -uc
# Dump some information to make it easier to visually verify
# everything looks OK. Also, test the package with the lintian tool.
arch="$(dpkg --print-architecture)"
deb="../${name}_${version}_${arch}.deb"
changes="../${name}_${version}_${arch}.changes"
rm -f "../${name}-dbgsym_${version}_${arch}.deb"
sed -i '/dbgsym/d' "$changes"
ls -l "$deb"
dpkg -c "$deb"
lintian -i "$changes"
+1 -2
View File
@@ -1,2 +1 @@
radicle-native-ci binary: initial-upload-closes-no-bugs
radicle-native-ci binary: no-manual-page
radicle-native-ci: embedded-library libyaml [usr/bin/radicle-native-ci]
+1
View File
@@ -0,0 +1 @@
radicle-native-ci.1
+2 -2
View File
@@ -7,8 +7,8 @@ override_dh_auto_build:
true
override_dh_auto_install:
cargo install --offline --locked --path=. --root=debian/radicle-native-ci
rm -f debian/*/.crates*.*
cargo install --offline --locked --path=. --root=debian/radicle-native-ci/usr --bin radicle-native-ci
find debian -name '.crates*' -delete
override_dh_auto_test:
echo tests are disabled, for now
+17
View File
@@ -0,0 +1,17 @@
.TH RADICLE\-NATIVE\-CI 1
.SH NAME
radicle\-native\-ci \- Radicle native CI adapter
.SH SYNOPSIS
.B radicle\-native\-ci
.SH DESCRIPTION
.B radicle\-native\-ci
is an adapter for the Radicle CI broker to run shell commands locally.
.PP
For complete information about command line use, run
.BR "radicle\-native\-ci \-\-help" .
.SH "SEE ALSO"
.BR cib (1)
.SH AUTHORS
.UR https://radicle.xyz/
The Radicle Project
.UE