lmcp: Debian packaging + CI publish via hertz reprepro
- debian/lmcp/build-deb.sh fetches the v0.3.0 tarball, lays out the filetree, and uses dpkg-deb to assemble lmcp_0.3.0-1_all.deb directly on the Arch aarch64 runner (no debhelper needed for a pure-Lua pkg). - workflow job 'lmcp-debian' rsyncs the .deb to hertz's marfritrepo incoming dir, then ssh-triggers 'publish-deb <suite>' for both bookworm and trixie. publish-deb wraps 'reprepro includedeb' and rsyncs dists/+pool/ to nc. - New secret MARFRIT_REPO_HERTZ_KEY uploaded to Gitea repo. Forced command on hertz routes rsync uploads vs publish-deb triggers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
# Build lmcp_<ver>_all.deb from this directory using dpkg-deb directly.
|
||||
# Run from inside the runner container, which has dpkg installed.
|
||||
#
|
||||
# This avoids dh/debhelper to keep the build simple and runnable on a
|
||||
# non-Debian builder. The resulting .deb is structurally a normal apt
|
||||
# package (Architecture: all, depends on lua + lua-socket).
|
||||
set -euo pipefail
|
||||
|
||||
PKGVER=0.3.0
|
||||
PKGREL=1
|
||||
LMCP_TARBALL_SHA256=80a37fc41633ae285b86f2f6cdd97f0c922c03022dce09addd47aeb379f2bcff
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -sSLfo lmcp.tar.gz "https://git.reauktion.de/marfrit/lmcp/archive/v${PKGVER}.tar.gz"
|
||||
echo "$LMCP_TARBALL_SHA256 lmcp.tar.gz" | sha256sum -c
|
||||
tar xzf lmcp.tar.gz
|
||||
|
||||
ROOT="$work/pkgroot"
|
||||
mkdir -p "$ROOT/DEBIAN" \
|
||||
"$ROOT/usr/share/lua/5.4" \
|
||||
"$ROOT/usr/bin" \
|
||||
"$ROOT/usr/share/doc/lmcp"
|
||||
|
||||
cp lmcp/lmcp.lua "$ROOT/usr/share/lua/5.4/"
|
||||
cp lmcp/json.lua "$ROOT/usr/share/lua/5.4/"
|
||||
cp lmcp/server.lua "$ROOT/usr/share/lua/5.4/"
|
||||
install -m 755 lmcp/example_server.lua "$ROOT/usr/bin/lmcp-example"
|
||||
cp lmcp/README.md "$ROOT/usr/share/doc/lmcp/"
|
||||
cp "$HERE/debian/copyright" "$ROOT/usr/share/doc/lmcp/copyright"
|
||||
cp "$HERE/debian/changelog" "$ROOT/usr/share/doc/lmcp/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/lmcp/changelog.Debian"
|
||||
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: lmcp
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: lua5.4 | lua5.3 | lua, lua-socket
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://git.reauktion.de/marfrit/lmcp
|
||||
Description: Lightweight MCP server in pure Lua
|
||||
lmcp is a small Model Context Protocol server written in Lua. It exposes
|
||||
user-defined tools over HTTP for use by AI agents.
|
||||
.
|
||||
Library files install to /usr/share/lua/5.4/. The example server is
|
||||
available as /usr/bin/lmcp-example.
|
||||
EOF
|
||||
|
||||
# Build the .deb. Output to current dir of the caller.
|
||||
DEB_OUT=lmcp_${PKGVER}-${PKGREL}_all.deb
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
Reference in New Issue
Block a user