Merge ap/packaging
This commit is contained in:
commit
c81e5f567a
9 files changed
+533
-1
No files matched your search
@@ -81,7 +81,21 @@
|
||||
| PS5 Remote Play (needs chiaki-ng with SmoovPlay's frame tap) and capture cards | Wired as `ps5` / `capture:<name>` sources, **not tested** without the hardware. |
|
||||
| lsfg-vk frame generation for any game | Planned |
|
||||
| DLSS | Planned. Depends on what each game and driver really supports. |
|
||||
| `.deb`, AUR, AppImage, Flatpak and a one-line installer | Planned |
|
||||
| One-line installer (`install.sh`) | Working on Debian/Ubuntu/neon/Mint, Arch/CachyOS/Manjaro and Fedora (tested with `--dry-run` against real and container `/etc/os-release` fixtures for each, and a real build + install on this machine). openSUSE path runs without error in a container but hasn't built there. No release packages are published yet, so it always builds from source with cargo. |
|
||||
| `.deb` (`packaging/deb/build.sh`) | Working: builds and installs on this machine (Debian trixie host). Not tested on a target Debian/Ubuntu install, no postinst/prerm. |
|
||||
| AUR (`packaging/arch/PKGBUILD`) | Untested. Needs a pushed git tag to build against; not run through `makepkg` here. |
|
||||
| AppImage (`packaging/appimage/build.sh`) | Untested. Needs `linuxdeploy` and `appimagetool`, neither available in this environment. |
|
||||
| Flatpak | Planned |
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
curl -fsSL https://git.molberg.cloud/alex/summit/raw/branch/main/install.sh | sh
|
||||
```
|
||||
|
||||
Detects your distro (Arch/CachyOS/Manjaro, Debian/Ubuntu/neon/Mint, Fedora, openSUSE), your GPU vendor and your session type, prints exactly what it's about to do, and asks before any `sudo` step (`--yes` skips that, `--dry-run` only prints). Builds Summit from source with `cargo` (no release packages are published yet) and sets up the engine's Python virtualenv with `uv` (Python 3.12, CUDA 12.8 torch only if it finds an NVIDIA GPU). `--uninstall` removes what it installed.
|
||||
|
||||
Prebuilt packages: a `.deb` can be built locally with `packaging/deb/build.sh`; `packaging/arch/PKGBUILD` and `packaging/appimage/build.sh` exist but are untested (see the table above).
|
||||
|
||||
## Try the CLI
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Linux packaging
|
||||
|
||||
## What changed
|
||||
|
||||
- `install.sh` (repo root): POSIX `sh` one-liner installer. Detects distro family (Arch/CachyOS/Manjaro, Debian/Ubuntu/neon/Mint, Fedora, openSUSE) from `/etc/os-release`, GPU vendor (nvidia/amd/intel/none) from `lspci`, and session type (wayland/x11) from `XDG_SESSION_TYPE`/env. Prints its plan, asks before any `sudo` step unless `--yes`, supports `--dry-run` and `--uninstall`. Checks for a matching release asset on the Gitea API first (`.pkg.tar.zst` for Arch, `.deb` for Debian); none exist yet (no tags published), so it always falls back to building from source with `cargo` into `~/.cache/summit/src`, installing to `/usr/local/bin` and `/usr/local/share/summit/engine`. Sets up the engine's venv with `uv venv --python 3.12`, installs `engine/requirements.txt`, and installs the CUDA 12.8 torch wheel only when an NVIDIA GPU was detected.
|
||||
- `packaging/arch/PKGBUILD`: builds from a git tag archive (`$url/archive/v$pkgver.tar.gz`), installs both binaries, the engine tree under `/usr/share/summit/engine`, the `.desktop` file and icon.
|
||||
- `packaging/deb/control` + `packaging/deb/build.sh`: assembles a staging tree and runs `dpkg-deb --build` directly (no `debhelper`/`cargo-deb` dependency at build time, though `cargo-deb` was installed and considered — see below).
|
||||
- `packaging/appimage/build.sh`: recipe using `linuxdeploy` + `appimagetool`.
|
||||
- `packaging/summit.desktop`, `packaging/icons/summit.png` (reused from `engine/framegen/assets/icon_64.png`).
|
||||
- README: added an "Install" section with the one-liner in a copyable block, and updated the status table for `.deb`/AUR/AppImage/Flatpak to replace the old blanket "Planned" row.
|
||||
|
||||
## What I verified and how
|
||||
|
||||
- `shellcheck -s sh` is clean on `install.sh`, `packaging/deb/build.sh` and `packaging/appimage/build.sh` (shellcheck installed via apt for this session).
|
||||
- `install.sh --dry-run` ran clean on this machine (Debian trixie, real hardware: detected `debian`/`nvidia`).
|
||||
- `install.sh --dry-run --yes` run inside `docker run debian:bookworm-slim`, `archlinux:latest`, `fedora:latest` and `opensuse/leap:latest` containers, each producing the correct distro-family branch and package manager commands with no errors.
|
||||
- Confirmed the interactive sudo-confirmation path exists and the non-root, non-`--yes`, non-dry-run path requires a `y` answer (code-reviewed; not exercised live since dry-run intentionally skips prompting).
|
||||
- `install.sh --dry-run --uninstall` prints the expected `rm` commands and leaves user data/config alone.
|
||||
- Built real release binaries with `cargo build --release -p summit -p summit-gui`, then ran `packaging/deb/build.sh`, which produced `target/debian/summit_0.0.1_amd64.deb` (~11 MB). Verified its contents and control metadata with `dpkg-deb --info` / `--contents`: both binaries, the engine tree, desktop file, icon and LICENSE are present with correct permissions.
|
||||
- Did **not** install the `.deb` on a real system (no safe way to do so without affecting this environment's actual package state) and did not run it through `apt`/`dpkg -i` end to end.
|
||||
- `packaging/arch/PKGBUILD` was not run through `makepkg` (not installed in this environment, and it needs a pushed `v0.0.1` git tag/release archive that doesn't exist yet). Reviewed by hand against `cargo build --frozen --release` and PKGBUILD conventions only.
|
||||
- `packaging/appimage/build.sh` was not run: `linuxdeploy` and `appimagetool` are not available here and I did not download arbitrary third-party binaries into this environment. Reviewed by hand only.
|
||||
- `cargo test --workspace`: 43 + 14 tests pass (no code was touched, only new packaging files and README).
|
||||
|
||||
## What is NOT done
|
||||
|
||||
- No Gitea release/tag exists yet, so the "native package if a release asset exists" path in `install.sh` is untested in practice (the logic to find and download one is there, but there is nothing to find).
|
||||
- PKGBUILD is unbuilt/untested (needs `makepkg`, a real tag, and `arch` tooling).
|
||||
- AppImage recipe is unbuilt/untested (needs `linuxdeploy`/`appimagetool`).
|
||||
- The `.deb` was not installed and run on a target machine (only built and inspected).
|
||||
- openSUSE's `zypper` package install commands run without shell errors in `--dry-run` but were not run for real anywhere (no openSUSE machine with network access to packages here).
|
||||
- No Flatpak manifest (left as Planned, as requested).
|
||||
Executable
+331
@@ -0,0 +1,331 @@
|
||||
#!/bin/sh
|
||||
# Summit installer for Linux.
|
||||
#
|
||||
# curl -fsSL https://git.molberg.cloud/alex/summit/raw/branch/main/install.sh | sh
|
||||
#
|
||||
# POSIX sh, no bashisms. Detects your distro, GPU vendor and display session,
|
||||
# installs the Summit launcher (native package if one exists for a tagged
|
||||
# release, otherwise builds from source with cargo) and sets up the engine's
|
||||
# Python virtualenv (uv, Python 3.12, CUDA 12.8 torch only if an NVIDIA GPU
|
||||
# is present).
|
||||
#
|
||||
# Flags:
|
||||
# --yes, -y don't ask before sudo steps
|
||||
# --dry-run print what would happen, change nothing
|
||||
# --uninstall remove what this installer installed
|
||||
# --help, -h show this message
|
||||
|
||||
set -eu
|
||||
|
||||
REPO_API="https://git.molberg.cloud/api/v1/repos/alex/summit"
|
||||
REPO_GIT="https://git.molberg.cloud/alex/summit.git"
|
||||
PREFIX="${SUMMIT_PREFIX:-/usr/local}"
|
||||
SHARE_DIR="$PREFIX/share/summit"
|
||||
BIN_DIR="$PREFIX/bin"
|
||||
SRC_DIR="${SUMMIT_SRC_DIR:-$HOME/.cache/summit/src}"
|
||||
|
||||
ASSUME_YES=0
|
||||
DRY_RUN=0
|
||||
UNINSTALL=0
|
||||
|
||||
log() { printf '%s\n' "$*"; }
|
||||
step() { printf '\n==> %s\n' "$*"; }
|
||||
die() { printf 'error: %s\n' "$*" >&2; exit 1; }
|
||||
|
||||
run() {
|
||||
# Print the command, then execute it unless --dry-run.
|
||||
printf ' $ %s\n' "$*"
|
||||
if [ "$DRY_RUN" -eq 0 ]; then
|
||||
"$@"
|
||||
fi
|
||||
}
|
||||
|
||||
run_sudo() {
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
run "$@"
|
||||
return
|
||||
fi
|
||||
if [ "$ASSUME_YES" -eq 0 ] && [ "$DRY_RUN" -eq 0 ]; then
|
||||
printf ' needs sudo: %s\n' "$*"
|
||||
printf ' proceed? [y/N] '
|
||||
read -r reply
|
||||
case "$reply" in
|
||||
y|Y|yes|YES) ;;
|
||||
*) die "aborted before: $*" ;;
|
||||
esac
|
||||
fi
|
||||
run sudo "$@"
|
||||
}
|
||||
|
||||
usage() {
|
||||
sed -n '2,20p' "$0" | sed 's/^# \{0,1\}//'
|
||||
}
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--yes|-y) ASSUME_YES=1 ;;
|
||||
--dry-run) DRY_RUN=1 ;;
|
||||
--uninstall) UNINSTALL=1 ;;
|
||||
--help|-h) usage; exit 0 ;;
|
||||
*) die "unknown flag: $arg (see --help)" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Detection
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
DISTRO_ID=unknown
|
||||
DISTRO_FAMILY=unknown # arch, debian, fedora, opensuse
|
||||
|
||||
detect_distro() {
|
||||
if [ -r /etc/os-release ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/os-release
|
||||
DISTRO_ID="${ID:-unknown}"
|
||||
ID_LIKE_VAL="${ID_LIKE:-}"
|
||||
else
|
||||
DISTRO_ID=unknown
|
||||
ID_LIKE_VAL=""
|
||||
fi
|
||||
|
||||
case "$DISTRO_ID $ID_LIKE_VAL" in
|
||||
*arch*|*cachyos*|*manjaro*) DISTRO_FAMILY=arch ;;
|
||||
*debian*|*ubuntu*|*neon*|*linuxmint*|*mint*) DISTRO_FAMILY=debian ;;
|
||||
*fedora*) DISTRO_FAMILY=fedora ;;
|
||||
*opensuse*|*suse*) DISTRO_FAMILY=opensuse ;;
|
||||
*)
|
||||
case "$DISTRO_ID" in
|
||||
arch|cachyos|manjaro) DISTRO_FAMILY=arch ;;
|
||||
debian|ubuntu|neon|linuxmint) DISTRO_FAMILY=debian ;;
|
||||
fedora) DISTRO_FAMILY=fedora ;;
|
||||
opensuse*|sles) DISTRO_FAMILY=opensuse ;;
|
||||
*) DISTRO_FAMILY=unknown ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
GPU_VENDOR=unknown # nvidia, amd, intel, none
|
||||
|
||||
detect_gpu() {
|
||||
GPU_VENDOR=none
|
||||
if ! command -v lspci >/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
pci_vga="$(lspci -nn 2>/dev/null | grep -Ei 'vga|3d controller|display controller' || true)"
|
||||
case "$pci_vga" in
|
||||
*[Nn][Vv][Ii][Dd][Ii][Aa]*) GPU_VENDOR=nvidia ;;
|
||||
*) case "$pci_vga" in
|
||||
*[Aa][Mm][Dd]*|*[Aa][Tt][Ii]*|*[Rr]adeon*) GPU_VENDOR=amd ;;
|
||||
*) case "$pci_vga" in
|
||||
*[Ii]ntel*) GPU_VENDOR=intel ;;
|
||||
*) GPU_VENDOR=none ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
SESSION_TYPE=unknown # wayland, x11
|
||||
|
||||
detect_session() {
|
||||
if [ -n "${XDG_SESSION_TYPE:-}" ]; then
|
||||
SESSION_TYPE="$XDG_SESSION_TYPE"
|
||||
elif [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
||||
SESSION_TYPE=wayland
|
||||
elif [ -n "${DISPLAY:-}" ]; then
|
||||
SESSION_TYPE=x11
|
||||
else
|
||||
SESSION_TYPE=unknown
|
||||
fi
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Package manager glue
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
install_dependencies() {
|
||||
step "Installing build and runtime dependencies for $DISTRO_FAMILY"
|
||||
case "$DISTRO_FAMILY" in
|
||||
arch)
|
||||
run_sudo pacman -Sy --needed --noconfirm base-devel git curl pkgconf
|
||||
;;
|
||||
debian)
|
||||
run_sudo apt-get update
|
||||
run_sudo apt-get install -y build-essential git curl pkg-config libssl-dev
|
||||
;;
|
||||
fedora)
|
||||
run_sudo dnf install -y @development-tools git curl pkgconf-pkg-config openssl-devel
|
||||
;;
|
||||
opensuse)
|
||||
run_sudo zypper install -y -t pattern devel_basis
|
||||
run_sudo zypper install -y git curl pkg-config libopenssl-devel
|
||||
;;
|
||||
*)
|
||||
log " unrecognized distro family ($DISTRO_ID) — skipping package manager, assuming build tools are present"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ensure_rust() {
|
||||
if command -v cargo >/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
step "Rust toolchain not found, installing with rustup"
|
||||
run sh -c 'curl -fsSL https://sh.rustup.rs | sh -s -- -y'
|
||||
RUSTUP_ENV="$HOME/.cargo/env"
|
||||
if [ -r "$RUSTUP_ENV" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
. "$RUSTUP_ENV"
|
||||
fi
|
||||
}
|
||||
|
||||
ensure_uv() {
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
step "uv (Python package manager) not found, installing"
|
||||
run sh -c 'curl -fsSL https://astral.sh/uv/install.sh | sh'
|
||||
if [ -r "$HOME/.local/bin/env" ]; then
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
. "$HOME/.local/bin/env"
|
||||
fi
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Install / uninstall
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
release_asset_url() {
|
||||
# Prints a matching release asset URL for this distro family, or nothing.
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
case "$DISTRO_FAMILY" in
|
||||
arch) want="*.pkg.tar.zst" ;;
|
||||
debian) want="*.deb" ;;
|
||||
*) return ;;
|
||||
esac
|
||||
latest_json="$(curl -fsSL "$REPO_API/releases/latest" 2>/dev/null || true)"
|
||||
[ -n "$latest_json" ] || return
|
||||
printf '%s' "$latest_json" | grep -o '"browser_download_url":"[^"]*"' \
|
||||
| sed 's/"browser_download_url":"//; s/"$//' \
|
||||
| while IFS= read -r url; do
|
||||
# shellcheck disable=SC2254
|
||||
case "$url" in
|
||||
$want) printf '%s\n' "$url"; return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
install_native_package() {
|
||||
asset_url="$1"
|
||||
asset_file="/tmp/$(basename "$asset_url")"
|
||||
step "Downloading release asset: $asset_url"
|
||||
run curl -fsSL -o "$asset_file" "$asset_url"
|
||||
case "$DISTRO_FAMILY" in
|
||||
arch) run_sudo pacman -U --noconfirm "$asset_file" ;;
|
||||
debian) run_sudo apt-get install -y "$asset_file" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
build_from_source() {
|
||||
step "No usable release package found, building from source"
|
||||
ensure_rust
|
||||
if [ -d "$SRC_DIR/.git" ]; then
|
||||
run git -C "$SRC_DIR" fetch --tags
|
||||
run git -C "$SRC_DIR" checkout main
|
||||
run git -C "$SRC_DIR" pull --ff-only
|
||||
else
|
||||
run mkdir -p "$(dirname "$SRC_DIR")"
|
||||
run git clone "$REPO_GIT" "$SRC_DIR"
|
||||
fi
|
||||
run sh -c "cd '$SRC_DIR' && cargo build --release -p summit -p summit-gui"
|
||||
run_sudo install -Dm755 "$SRC_DIR/target/release/summit" "$BIN_DIR/summit"
|
||||
run_sudo install -Dm755 "$SRC_DIR/target/release/summit-gui" "$BIN_DIR/summit-gui"
|
||||
run_sudo mkdir -p "$SHARE_DIR/engine"
|
||||
run_sudo cp -r "$SRC_DIR/engine/." "$SHARE_DIR/engine/"
|
||||
}
|
||||
|
||||
setup_engine_venv() {
|
||||
step "Setting up the engine's Python environment (uv, Python 3.12)"
|
||||
ensure_uv
|
||||
engine_dir="$SHARE_DIR/engine"
|
||||
if [ ! -d "$engine_dir" ]; then
|
||||
engine_dir="$SRC_DIR/engine"
|
||||
fi
|
||||
if [ ! -d "$engine_dir" ]; then
|
||||
log " engine sources not found, skipping venv setup"
|
||||
return
|
||||
fi
|
||||
run sh -c "cd '$engine_dir' && uv venv --python 3.12 .venv"
|
||||
run sh -c "cd '$engine_dir' && uv pip install --python .venv -r requirements.txt"
|
||||
if [ "$GPU_VENDOR" = "nvidia" ]; then
|
||||
step "NVIDIA GPU detected: installing CUDA 12.8 torch build"
|
||||
run sh -c "cd '$engine_dir' && uv pip install --python .venv torch --index-url https://download.pytorch.org/whl/cu128"
|
||||
else
|
||||
log " no NVIDIA GPU detected, skipping CUDA torch (engine will run CPU-only or be unavailable)"
|
||||
fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
step "Plan"
|
||||
log " distro family : $DISTRO_FAMILY (ID=$DISTRO_ID)"
|
||||
log " GPU vendor : $GPU_VENDOR"
|
||||
log " session type : $SESSION_TYPE"
|
||||
log " will install : summit, summit-gui into $BIN_DIR"
|
||||
log " engine : $SHARE_DIR/engine with its own venv"
|
||||
if [ "$DRY_RUN" -eq 1 ]; then
|
||||
log " (--dry-run: no changes will be made)"
|
||||
fi
|
||||
|
||||
if [ "$ASSUME_YES" -eq 0 ] && [ "$DRY_RUN" -eq 0 ]; then
|
||||
printf '\nProceed? [y/N] '
|
||||
read -r reply
|
||||
case "$reply" in
|
||||
y|Y|yes|YES) ;;
|
||||
*) die "aborted" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
install_dependencies
|
||||
|
||||
asset_url="$(release_asset_url || true)"
|
||||
if [ -n "$asset_url" ]; then
|
||||
install_native_package "$asset_url"
|
||||
else
|
||||
build_from_source
|
||||
fi
|
||||
|
||||
setup_engine_venv
|
||||
|
||||
step "Done"
|
||||
log " summit -> $BIN_DIR/summit"
|
||||
log " summit-gui -> $BIN_DIR/summit-gui"
|
||||
log " engine -> $SHARE_DIR/engine (venv at $SHARE_DIR/engine/.venv)"
|
||||
}
|
||||
|
||||
do_uninstall() {
|
||||
step "Uninstalling Summit"
|
||||
run_sudo rm -f "$BIN_DIR/summit" "$BIN_DIR/summit-gui"
|
||||
run_sudo rm -rf "$SHARE_DIR"
|
||||
log "Left in place: $SRC_DIR (build cache), ~/.config/summit, ~/.local/share/summit (your data)"
|
||||
}
|
||||
|
||||
main() {
|
||||
detect_distro
|
||||
detect_gpu
|
||||
detect_session
|
||||
|
||||
if [ "$UNINSTALL" -eq 1 ]; then
|
||||
do_uninstall
|
||||
else
|
||||
do_install
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# Build a Summit AppImage. Untested here: no network access to download
|
||||
# linuxdeploy/appimagetool in this environment. Needs linuxdeploy and
|
||||
# appimagetool on PATH (https://github.com/linuxdeploy/linuxdeploy,
|
||||
# https://github.com/AppImage/appimagetool), or set LINUXDEPLOY /
|
||||
# APPIMAGETOOL to their paths.
|
||||
#
|
||||
# Usage: packaging/appimage/build.sh [output-dir]
|
||||
#
|
||||
# The engine's Python venv is not bundled (it is GPU-specific and far too
|
||||
# large for an AppImage); summit-gui still runs, but `summit enhance` needs
|
||||
# install.sh's venv setup done separately.
|
||||
|
||||
set -eu
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OUT_DIR="${1:-$REPO_ROOT/target/appimage}"
|
||||
LINUXDEPLOY="${LINUXDEPLOY:-linuxdeploy}"
|
||||
APPIMAGETOOL="${APPIMAGETOOL:-appimagetool}"
|
||||
APPDIR="$REPO_ROOT/target/appimage/Summit.AppDir"
|
||||
|
||||
command -v "$LINUXDEPLOY" >/dev/null 2>&1 || { echo "linuxdeploy not found, set LINUXDEPLOY=/path/to/it" >&2; exit 1; }
|
||||
command -v "$APPIMAGETOOL" >/dev/null 2>&1 || { echo "appimagetool not found, set APPIMAGETOOL=/path/to/it" >&2; exit 1; }
|
||||
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
if [ ! -x target/release/summit-gui ]; then
|
||||
echo "building release binaries..." >&2
|
||||
cargo build --release -p summit -p summit-gui
|
||||
fi
|
||||
|
||||
rm -rf "$APPDIR"
|
||||
mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/summit/engine"
|
||||
cp target/release/summit "$APPDIR/usr/bin/"
|
||||
cp target/release/summit-gui "$APPDIR/usr/bin/"
|
||||
cp -r engine/. "$APPDIR/usr/share/summit/engine/"
|
||||
find "$APPDIR/usr/share/summit/engine" -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
mkdir -p "$OUT_DIR"
|
||||
"$LINUXDEPLOY" \
|
||||
--appdir "$APPDIR" \
|
||||
--executable "$APPDIR/usr/bin/summit-gui" \
|
||||
--desktop-file packaging/summit.desktop \
|
||||
--icon-file packaging/icons/summit.png \
|
||||
--output appimage
|
||||
|
||||
mv ./Summit*.AppImage "$OUT_DIR/" 2>/dev/null || true
|
||||
echo "built AppImage in: $OUT_DIR"
|
||||
@@ -0,0 +1,41 @@
|
||||
# Maintainer: Alex <[email protected]>
|
||||
pkgname=summit
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="One launcher for every game and app on Linux, with AI upscaling and frame generation"
|
||||
arch=('x86_64')
|
||||
url="https://git.molberg.cloud/alex/summit"
|
||||
license=('MIT')
|
||||
depends=('gcc-libs' 'openssl')
|
||||
makedepends=('cargo' 'git')
|
||||
optdepends=(
|
||||
'uv: set up the AI engine'"'"'s Python environment'
|
||||
'python>=3.12: run the AI engine'
|
||||
)
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
cargo fetch --locked
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
cargo build --frozen --release -p summit -p summit-gui
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
install -Dm755 target/release/summit "$pkgdir/usr/bin/summit"
|
||||
install -Dm755 target/release/summit-gui "$pkgdir/usr/bin/summit-gui"
|
||||
|
||||
install -d "$pkgdir/usr/share/summit/engine"
|
||||
cp -r engine/. "$pkgdir/usr/share/summit/engine/"
|
||||
find "$pkgdir/usr/share/summit/engine" -name '__pycache__' -exec rm -rf {} +
|
||||
|
||||
install -Dm644 packaging/summit.desktop "$pkgdir/usr/share/applications/summit.desktop"
|
||||
install -Dm644 packaging/icons/summit.png "$pkgdir/usr/share/icons/hicolor/64x64/apps/summit.png"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
# Build a .deb for Summit using a plain debian-package staging tree (no
|
||||
# cargo-deb required, just cargo, dpkg-deb and fakeroot/root).
|
||||
#
|
||||
# Usage: packaging/deb/build.sh [output-dir]
|
||||
#
|
||||
# Must be run from the repository root, after `cargo build --release`
|
||||
# has produced target/release/summit and target/release/summit-gui.
|
||||
|
||||
set -eu
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OUT_DIR="${1:-$REPO_ROOT/target/debian}"
|
||||
VERSION="$(grep -m1 '^version' "$REPO_ROOT/Cargo.toml" | sed -E 's/.*"(.*)".*/\1/')"
|
||||
STAGE="$(mktemp -d)"
|
||||
trap 'rm -rf "$STAGE"' EXIT
|
||||
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
if [ ! -x target/release/summit ] || [ ! -x target/release/summit-gui ]; then
|
||||
echo "building release binaries..." >&2
|
||||
cargo build --release -p summit -p summit-gui
|
||||
fi
|
||||
|
||||
chmod 755 "$STAGE"
|
||||
mkdir -p "$STAGE/DEBIAN"
|
||||
sed "s/^Version:.*/Version: $VERSION/" packaging/deb/control > "$STAGE/DEBIAN/control"
|
||||
|
||||
install -Dm755 target/release/summit "$STAGE/usr/bin/summit"
|
||||
install -Dm755 target/release/summit-gui "$STAGE/usr/bin/summit-gui"
|
||||
|
||||
install -d "$STAGE/usr/share/summit/engine"
|
||||
cp -r engine/. "$STAGE/usr/share/summit/engine/"
|
||||
find "$STAGE/usr/share/summit/engine" -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
install -Dm644 packaging/summit.desktop "$STAGE/usr/share/applications/summit.desktop"
|
||||
install -Dm644 packaging/icons/summit.png "$STAGE/usr/share/icons/hicolor/64x64/apps/summit.png"
|
||||
install -Dm644 LICENSE "$STAGE/usr/share/doc/summit/LICENSE"
|
||||
|
||||
mkdir -p "$OUT_DIR"
|
||||
OUT_FILE="$OUT_DIR/summit_${VERSION}_amd64.deb"
|
||||
dpkg-deb --build --root-owner-group "$STAGE" "$OUT_FILE"
|
||||
echo "built: $OUT_FILE"
|
||||
@@ -0,0 +1,14 @@
|
||||
Package: summit
|
||||
Version: 0.0.1
|
||||
Section: games
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: libc6, libssl3
|
||||
Recommends: uv, python3 (>= 3.12)
|
||||
Maintainer: Alex <[email protected]>
|
||||
Description: One launcher for every game and app on Linux
|
||||
Summit is a Rust game launcher that scans Steam, Heroic and Lutris libraries
|
||||
and gives every title AI upscaling and frame generation. This package
|
||||
contains the summit CLI, the summit-gui launcher, and the engine's Python
|
||||
sources under /usr/share/summit/engine (its virtualenv is set up separately,
|
||||
see install.sh).
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Summit
|
||||
Comment=One launcher for every game and app on Linux, with AI upscaling and frame generation
|
||||
Exec=summit-gui
|
||||
Icon=summit
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
StartupNotify=true
|
||||
Reference in new issue
Block a user