diff --git a/TODO-4.2.1.md b/TODO-4.2.1.md index 9d5948c..eda15e7 100644 --- a/TODO-4.2.1.md +++ b/TODO-4.2.1.md @@ -25,7 +25,10 @@ - Rotate uses jpegtran for JPEGs, supports flip-only operations ## AUR Packages -- [ ] `stegasoo-cli` - standalone CLI package (no web dependencies) +- [x] `stegasoo-cli` - standalone CLI package (no web dependencies) + - Created aur-cli/PKGBUILD with [cli,dct,compression] extras only + - No flask/gunicorn/fastapi/uvicorn/pyzbar deps + - 68MB vs 79MB for full package - [ ] `stegasoo-api` - REST API package (needs auth overhaul first) ## API Auth Work (blocking stegasoo-api) diff --git a/aur-cli/.SRCINFO b/aur-cli/.SRCINFO new file mode 100644 index 0000000..a7a3b8c --- /dev/null +++ b/aur-cli/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = stegasoo-cli-git + pkgdesc = Secure steganography CLI with hybrid photo + passphrase + PIN authentication + pkgver = 4.2.0.r0.g525bcec + pkgrel = 1 + url = https://github.com/adlee-was-taken/stegasoo + install = stegasoo-cli-git.install + arch = x86_64 + license = MIT + makedepends = git + makedepends = python + makedepends = python-build + makedepends = python-hatchling + depends = python>=3.11 + optdepends = libjpeg-turbo: jpegtran for lossless JPEG rotation (DCT-safe) + provides = stegasoo-cli + conflicts = stegasoo-cli + conflicts = stegasoo + conflicts = stegasoo-git + source = stegasoo-cli-git::git+https://github.com/adlee-was-taken/stegasoo.git#branch=main + sha256sums = SKIP + +pkgname = stegasoo-cli-git diff --git a/aur-cli/PKGBUILD b/aur-cli/PKGBUILD new file mode 100644 index 0000000..1cdc5ec --- /dev/null +++ b/aur-cli/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Aaron D. Lee +pkgname=stegasoo-cli-git +pkgver=4.2.0.r4.g525bcec +pkgrel=1 +pkgdesc="Secure steganography CLI with hybrid photo + passphrase + PIN authentication" +arch=('x86_64') +url="https://github.com/adlee-was-taken/stegasoo" +license=('MIT') + +# Python 3.11-3.14 supported (uses jpeglib for modern Python compatibility) +depends=( + 'python>=3.11' +) +makedepends=( + 'git' + 'python' + 'python-build' + 'python-hatchling' +) +optdepends=( + 'libjpeg-turbo: jpegtran for lossless JPEG rotation (DCT-safe)' +) +provides=('stegasoo-cli') +conflicts=('stegasoo-cli' 'stegasoo' 'stegasoo-git') +install=stegasoo-cli-git.install +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" + python -m build --wheel --no-isolation +} + +package() { + cd "$pkgname" + + # Install to /opt/stegasoo-cli with dedicated venv + install -dm755 "$pkgdir/opt/stegasoo-cli" + + # Create fresh venv in package + python -m venv "$pkgdir/opt/stegasoo-cli/venv" + + # Install the wheel with CLI + DCT + compression extras (no web/api) + local wheel=$(ls dist/*.whl | head -1) + "$pkgdir/opt/stegasoo-cli/venv/bin/pip" install --no-cache-dir "${wheel}[cli,dct,compression]" + + # Fix shebangs - replace build-time paths with installed paths + find "$pkgdir/opt/stegasoo-cli/venv/bin" -type f -exec \ + sed -i "s|$pkgdir/opt/stegasoo-cli/venv|/opt/stegasoo-cli/venv|g" {} \; + + # Fix pyvenv.cfg + sed -i "s|$pkgdir||g" "$pkgdir/opt/stegasoo-cli/venv/pyvenv.cfg" + + # Create symlink to /usr/bin + install -dm755 "$pkgdir/usr/bin" + ln -s /opt/stegasoo-cli/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" +} diff --git a/aur-cli/stegasoo-cli-git.install b/aur-cli/stegasoo-cli-git.install new file mode 100644 index 0000000..4a451bc --- /dev/null +++ b/aur-cli/stegasoo-cli-git.install @@ -0,0 +1,17 @@ +post_install() { + echo "" + echo "Stegasoo CLI installed successfully!" + echo "" + echo "Usage:" + echo " stegasoo --help # Show all commands" + echo " stegasoo encode ... # Hide data in an image" + echo " stegasoo decode ... # Extract hidden data" + echo " stegasoo tools --help # Image tools (compress, rotate, etc.)" + echo "" + echo "For web UI or REST API, install stegasoo-git instead." + echo "" +} + +post_upgrade() { + post_install +} diff --git a/aur-cli/test-build.sh b/aur-cli/test-build.sh new file mode 100755 index 0000000..075b0b2 --- /dev/null +++ b/aur-cli/test-build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Test build the AUR CLI package locally + +set -e + +cd "$(dirname "$0")" + +echo "=== Cleaning previous builds ===" +rm -rf stegasoo-cli-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-cli-git-*.pkg.tar.zst" +echo "To test: makepkg -si"