Add AUR package (stegasoo-git)
- Uses python312 from AUR for jpegio 3.13 compatibility - Self-contained venv in /opt/stegasoo - Includes systemd service files for web and API - CLI symlinked to /usr/bin/stegasoo Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
104
aur/PKGBUILD
Normal file
104
aur/PKGBUILD
Normal file
@@ -0,0 +1,104 @@
|
||||
# Maintainer: Aaron D. Lee <your-email@example.com>
|
||||
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" <<EOF
|
||||
[Unit]
|
||||
Description=Stegasoo Web UI
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=stegasoo
|
||||
Environment="PATH=/opt/stegasoo/venv/bin"
|
||||
WorkingDirectory=/opt/stegasoo/venv/lib/python3.12/site-packages/frontends/web
|
||||
ExecStart=/opt/stegasoo/venv/bin/gunicorn -b 127.0.0.1:5000 app:app
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
install -Dm644 /dev/stdin "$pkgdir/usr/lib/systemd/system/stegasoo-api.service" <<EOF
|
||||
[Unit]
|
||||
Description=Stegasoo REST API
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=stegasoo
|
||||
Environment="PATH=/opt/stegasoo/venv/bin"
|
||||
WorkingDirectory=/opt/stegasoo/venv/lib/python3.12/site-packages/frontends/api
|
||||
ExecStart=/opt/stegasoo/venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
}
|
||||
79
aur/README.md
Normal file
79
aur/README.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Stegasoo AUR Package
|
||||
|
||||
> **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
|
||||
22
aur/test-build.sh
Executable file
22
aur/test-build.sh
Executable file
@@ -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"
|
||||
Reference in New Issue
Block a user