Files
agent-manager/packaging/deb/make-deb.sh
T

34 lines
913 B
Bash

#!/bin/sh
# Builds an am_<version>_amd64.deb from dist/am-linux-x86_64.
# Usage: packaging/deb/make-deb.sh <version> [arch]
set -e
VERSION="$1"
ARCH="${2:-amd64}"
ROOT="$(mktemp -d)"
PKG="am_${VERSION}_${ARCH}"
mkdir -p "$ROOT/$PKG/usr/bin" "$ROOT/$PKG/usr/share/doc/am" "$ROOT/$PKG/DEBIAN"
cp dist/am-linux-x86_64 "$ROOT/$PKG/usr/bin/am"
chmod 755 "$ROOT/$PKG/usr/bin/am"
cat > "$ROOT/$PKG/DEBIAN/control" <<EOF
Package: am
Version: $VERSION
Section: utils
Priority: optional
Architecture: $ARCH
Maintainer: bruno <[email protected]>
Description: Manage local AI coding agents
List, install, start, stop and update local AI coding agents with
automatic dependency handling and a YAML-driven catalog.
EOF
cat > "$ROOT/$PKG/usr/share/doc/am/copyright" <<EOF
Copyright (c) 2026 bruno
License: MIT
EOF
dpkg-deb --build --root-owner-group "$ROOT/$PKG" "dist/$PKG.deb"
rm -rf "$ROOT"
echo "built dist/$PKG.deb"