diff --git a/RELEASE.md b/RELEASE.md index 6f2d11a..900cb98 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -54,6 +54,12 @@ Wraps the standard binary into a self-contained AppImage. ./packaging/build_appimage.sh ``` +### Flatpak (Linux) +Generates a standalone `.flatpak` bundle. Requires `flatpak-builder`. +```bash +./packaging/build_flatpak.sh +``` + ## 4. Release Execution 1. **Version Bump:** Update `__version__` in `voxvera/__init__.py` and `version` in `pyproject.toml`. diff --git a/packaging/build_flatpak.sh b/packaging/build_flatpak.sh new file mode 100755 index 0000000..ead41aa --- /dev/null +++ b/packaging/build_flatpak.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +# Ensure we are in project root +cd "$(dirname "$0")/.." + +ARCH=$(uname -m) +BINARY="voxvera/resources/bin/voxvera-linux-$ARCH" + +if [ ! -f "$BINARY" ]; then + echo "Binary not found: $BINARY. Run scripts/build_binaries.sh first." >&2 + exit 1 +fi + +if ! command -v flatpak-builder &> /dev/null; then + echo "flatpak-builder not found. Please install it (e.g., sudo apt install flatpak-builder)" >&2 + exit 1 +fi + +echo "Building Flatpak package..." + +BUILD_DIR=build/flatpak-build +REPO_DIR=build/flatpak-repo +MANIFEST=packaging/flatpak/org.voxvera.VoxVera.yml + +# Clean previous +rm -rf "$BUILD_DIR" "$REPO_DIR" + +# Build +flatpak-builder --force-clean --repo="$REPO_DIR" "$BUILD_DIR" "$MANIFEST" + +# Generate a standalone .flatpak file +flatpak build-bundle "$REPO_DIR" voxvera/resources/bin/VoxVera-x86_64.flatpak org.voxvera.VoxVera + +echo "Flatpak bundle created at voxvera/resources/bin/VoxVera-x86_64.flatpak" diff --git a/packaging/flatpak/org.voxvera.VoxVera.desktop b/packaging/flatpak/org.voxvera.VoxVera.desktop new file mode 100644 index 0000000..7c73950 --- /dev/null +++ b/packaging/flatpak/org.voxvera.VoxVera.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=VoxVera +Comment=Anonymous message-spreading and flyer-generation tool +Exec=voxvera +Icon=org.voxvera.VoxVera +Categories=Utility;Network; +Terminal=true +StartupWMClass=voxvera diff --git a/packaging/flatpak/org.voxvera.VoxVera.png b/packaging/flatpak/org.voxvera.VoxVera.png new file mode 100644 index 0000000..b2e4486 Binary files /dev/null and b/packaging/flatpak/org.voxvera.VoxVera.png differ diff --git a/packaging/flatpak/org.voxvera.VoxVera.yml b/packaging/flatpak/org.voxvera.VoxVera.yml new file mode 100644 index 0000000..3654fb6 --- /dev/null +++ b/packaging/flatpak/org.voxvera.VoxVera.yml @@ -0,0 +1,27 @@ +app-id: org.voxvera.VoxVera +runtime: org.freedesktop.Platform +runtime-version: '23.08' +sdk: org.freedesktop.Sdk +command: voxvera +finish-args: + - --share=network + - --socket=fallback-x11 + - --socket=wayland + - --device=dri + - --share=ipc + - --filesystem=xdg-run/tor:ro # If using external Tor +modules: + - name: voxvera + buildsystem: simple + build-commands: + - install -D voxvera /app/bin/voxvera + - install -D org.voxvera.VoxVera.desktop /app/share/applications/org.voxvera.VoxVera.desktop + - install -D org.voxvera.VoxVera.png /app/share/icons/hicolor/512x512/apps/org.voxvera.VoxVera.png + sources: + - type: file + path: ../../voxvera/resources/bin/voxvera-linux-x86_64 + dest-filename: voxvera + - type: file + path: org.voxvera.VoxVera.desktop + - type: file + path: org.voxvera.VoxVera.png