diff --git a/aur/PKGBUILD b/aur/PKGBUILD new file mode 100644 index 0000000..90e6517 --- /dev/null +++ b/aur/PKGBUILD @@ -0,0 +1,104 @@ +# Maintainer: Aaron D. Lee +pkgname=stegasoo-git +pkgver=4.2.0.r0.g0000000 +pkgrel=1 +pkgdesc="Secure steganography with hybrid photo + passphrase + PIN authentication" +arch=('x86_64') +url="https://github.com/adlee-was-taken/stegasoo" +license=('MIT') + +# Use python312 from AUR to future-proof against 3.13 (jpegio compatibility) +depends=( + 'python312' +) +makedepends=( + 'git' + 'python312' +) +optdepends=( + 'zbar: QR code reading from webcam/images' +) +provides=('stegasoo') +conflicts=('stegasoo') +source=("${pkgname}::git+https://github.com/adlee-was-taken/stegasoo.git#branch=main") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || \ + printf "%s.r%s.g%s" "4.2.0" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$pkgname" + + # Create venv with python3.12 + python3.12 -m venv --system-site-packages "$srcdir/venv" + source "$srcdir/venv/bin/activate" + + # Install build deps + pip install --upgrade pip wheel hatchling build + + # Build wheel + python -m build --wheel --no-isolation +} + +package() { + cd "$pkgname" + + # Install to /opt/stegasoo with dedicated venv + install -dm755 "$pkgdir/opt/stegasoo" + + # Create fresh venv in package + python3.12 -m venv "$pkgdir/opt/stegasoo/venv" + + # Install the wheel with all extras + "$pkgdir/opt/stegasoo/venv/bin/pip" install --no-cache-dir dist/*.whl[all] + + # Create symlinks to /usr/bin + install -dm755 "$pkgdir/usr/bin" + ln -s /opt/stegasoo/venv/bin/stegasoo "$pkgdir/usr/bin/stegasoo" + + # Install license + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # Install docs + install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + + # Install systemd service files (optional) + install -Dm644 /dev/stdin "$pkgdir/usr/lib/systemd/system/stegasoo-web.service" < **Note:** Uses Python 3.12 via `python312` AUR package (jpegio not yet compatible with 3.13) + +## Installation + +### From AUR (once published) +```bash +yay -S stegasoo-git +# or +paru -S stegasoo-git +``` + +### Manual build +```bash +git clone https://aur.archlinux.org/stegasoo-git.git +cd stegasoo-git +makepkg -si +``` + +## What Gets Installed + +- `/opt/stegasoo/venv/` - Self-contained Python 3.12 venv with all dependencies +- `/usr/bin/stegasoo` - CLI symlink +- `/usr/lib/systemd/system/stegasoo-web.service` - Web UI service +- `/usr/lib/systemd/system/stegasoo-api.service` - REST API service + +## Optional Dependencies + +```bash +# QR code reading from webcam/images +sudo pacman -S zbar +``` + +All other dependencies are bundled in the venv. + +## Usage + +### CLI +```bash +stegasoo --help +stegasoo generate --rsa --qr-ascii +stegasoo encode -i carrier.jpg -r reference.jpg -m "secret" -P passphrase -p 123456 +``` + +### Web UI (systemd) +```bash +# Create service user (first time) +sudo useradd -r -s /usr/bin/nologin stegasoo + +# Start service +sudo systemctl enable --now stegasoo-web + +# Access at http://localhost:5000 +``` + +### REST API (systemd) +```bash +# Start service +sudo systemctl enable --now stegasoo-api + +# Access at http://localhost:8000/docs +``` + +### Manual run (without systemd) +```bash +# Web UI +/opt/stegasoo/venv/bin/python -m gunicorn -b 0.0.0.0:5000 \ + --chdir /opt/stegasoo/venv/lib/python3.12/site-packages/frontends/web app:app + +# REST API +/opt/stegasoo/venv/bin/uvicorn \ + --app-dir /opt/stegasoo/venv/lib/python3.12/site-packages/frontends/api \ + main:app --host 0.0.0.0 --port 8000 +``` + +## Maintainer + +Aaron D. Lee diff --git a/aur/test-build.sh b/aur/test-build.sh new file mode 100755 index 0000000..27131fd --- /dev/null +++ b/aur/test-build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Test build the AUR package locally + +set -e + +cd "$(dirname "$0")" + +echo "=== Cleaning previous builds ===" +rm -rf stegasoo-git pkg src *.pkg.tar.zst *.whl 2>/dev/null || true + +echo "=== Generating .SRCINFO ===" +makepkg --printsrcinfo > .SRCINFO + +echo "=== Building package ===" +makepkg -sf + +echo "=== Package built ===" +ls -la *.pkg.tar.zst + +echo "" +echo "To install: sudo pacman -U stegasoo-git-*.pkg.tar.zst" +echo "To test: makepkg -si"