From 1859296186d22cae6eceb1acbd9d3e347d2e76db Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 25 Oct 2024 22:59:54 -0400 Subject: Package `hi` for Debian. This commit provides a Docker-based build process for generating `.deb` packages, which can be run in Docker Desktop. I don't love it, but it's the best option I have _right now_ for doing this. The resulting packages: * Install `hi` (and `hi-recanonicalize`), in `/usr/bin`. * Create a user (`hi`) and a data directory (`/var/lib/hi`). * Create and start a systemd service unit for `hi`. Packages are built for arm64 and amd64 (aka x86_64). --- tools/build-debian | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 tools/build-debian (limited to 'tools/build-debian') diff --git a/tools/build-debian b/tools/build-debian new file mode 100755 index 0000000..c64fc78 --- /dev/null +++ b/tools/build-debian @@ -0,0 +1,20 @@ +#!/bin/bash -e + +## tools/build-builder +## +## Builds a Debian package for the current tree. Output in ./target/debian. +## +## Requires the Debian builder (see tools/build-builder). + +cd "$(dirname "$0")/.." + +for platform in linux/arm64 linux/amd64; do + docker run \ + --platform "$platform" \ + --rm \ + --interactive \ + --tty \ + --volume "$PWD:/app" \ + "hi-debian-builder:$(tools/version)" \ + cargo deb +done -- cgit v1.2.3