Radish alpha
r
rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE
Radicle CI adapter for native CI
Radicle
Git
packaging: fix and tidy up the Debian packaging
Lars Wirzenius committed 8 months ago
commit 752c9fbb59b2bf8c13ec37555a25f34b1e9c8d03
parent 758dde8
5 files changed +58 -4
added debian/build-deb
@@ -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"
modified debian/lintian-overrides
@@ -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]
added debian/radicle-native-ci.manpages
@@ -0,0 +1 @@
+
radicle-native-ci.1
modified debian/rules
@@ -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
added radicle-native-ci.1
@@ -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