From 018846ad2037483fa037edfdf0d6a92729bad60a Mon Sep 17 00:00:00 2001 From: "Foad S. Farimani" Date: Fri, 9 Jan 2026 16:13:43 +0100 Subject: [PATCH 1/3] Add fdbox-git package --- fdbox-git/README.md | 108 ++++++++++++++++++++++++++++++++++++++++++++ fdbox-git/lure.sh | 55 ++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 fdbox-git/README.md create mode 100644 fdbox-git/lure.sh diff --git a/fdbox-git/README.md b/fdbox-git/README.md new file mode 100644 index 0000000..ecbba4c --- /dev/null +++ b/fdbox-git/README.md @@ -0,0 +1,108 @@ +# fdbox-git LURE Package + +## What is fdbox? + +[fdbox](https://github.com/diegoiast/fdbox) is a FreeDOS-like shell and utilities for Linux. It provides a command-line environment that mimics the classic DOS experience, implementing familiar commands like `dir`, `cd`, `type`, `copy`, `del`, and more. + +Think of it as a nostalgic bridge for those who grew up with DOS, or an educational tool for understanding how command-line interfaces evolved. + +### Features + +- FreeDOS-compatible command syntax +- Built-in commands: `dir`, `cd`, `cls`, `copy`, `del`, `echo`, `exit`, `md`, `rd`, `type`, `ver`, etc. +- Some Unix utilities: `cal`, `head`, `tail`, `hexdump` +- Lightweight C implementation +- Cross-platform (Linux, Windows) + +## Building Manually + +```bash +sudo apt install build-essential cmake git +git clone https://github.com/diegoiast/fdbox.git +cd fdbox +mkdir build && cd build +cmake .. -DCMAKE_BUILD_TYPE=Release +make +./fdbox +``` + +## Lessons Learned: LURE Packaging Pitfalls + +### 1. Debian Version Numbers Must Start with a Digit + +**Problem:** +``` +'Version' field value 'r282.6acbada-1': version number does not start with digit +``` + +**Cause:** The `version()` function generated `r282.6acbada` (commit count + short hash), but Debian policy requires version strings to begin with a digit. + +**Wrong:** +```bash +version() { + cd "$srcdir/fdbox" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +``` + +**Correct:** +```bash +version() { + cd "$srcdir/fdbox" + # Prefix with 0.0.0 to satisfy Debian's digit-first requirement + printf "0.0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} +``` + +**Result:** `0.0.0.r282.6acbada` — starts with a digit, Debian-compliant. + +### 2. Fallback Installation When No `make install` Target Exists + +**Problem:** Many small projects don't define an `install` target in their CMakeLists.txt. + +**Solution:** Use `||` to fall back to manual installation: +```bash +package() { + cd "$srcdir/fdbox/build" + make DESTDIR="$pkgdir" install || install -Dm755 fdbox "$pkgdir/usr/bin/fdbox" +} +``` + +This tries `make install` first, and if it fails, manually installs the binary with correct permissions (755) to `/usr/bin/`. + +### 3. CMake in `prepare()` vs `build()` + +**Why CMake runs in `prepare()`:** The CMake configure step downloads dependencies via CPM (CMake Package Manager) and requires internet access. LURE's `prepare()` phase is designed for tasks requiring network access, while `build()` should work offline. + +### 4. Git Source Syntax + +For git repositories in LURE, use the `git+` prefix: +```bash +sources=("git+https://github.com/diegoiast/fdbox.git") +checksums=("SKIP") # Git sources use SKIP for checksum +``` + +## Quick Reference: Debian Version Formats + +| Format | Valid? | Example | +|--------|--------|---------| +| `r123.abc1234` | ❌ No | Starts with letter | +| `0.0.0.r123.abc1234` | ✅ Yes | Starts with digit | +| `1.0.0` | ✅ Yes | Standard semver | +| `2024.01.15` | ✅ Yes | Date-based | +| `0~git20260109` | ✅ Yes | Pre-release with tilde | + +## File Structure + +``` +fdbox-git/ +├── lure.sh # LURE build script +├── README.md # This file +└── *.deb # Generated package (after build) +``` + +## References + +- [fdbox GitHub Repository](https://github.com/diegoiast/fdbox) +- [LURE Documentation](https://lure.sh/) +- [Debian Policy: Version Format](https://www.debian.org/doc/debian-policy/ch-controlfields.html#version) diff --git a/fdbox-git/lure.sh b/fdbox-git/lure.sh new file mode 100644 index 0000000..556ed8c --- /dev/null +++ b/fdbox-git/lure.sh @@ -0,0 +1,55 @@ +name="fdbox-git" +version="0.0.0" +release="1" +desc="FreeDOS-like shell and utilities for Linux" +homepage="https://github.com/diegoiast/fdbox" +maintainer="Foad " +architectures=("amd64") +license=("GPL-3.0-only") +provides=("fdbox") +conflicts=("fdbox") + +# Build Dependencies +# - cmake & git: required for build configuration and CPM downloads +# - python3: detected/used during configuration +# - build-essential: for gcc/make +build_deps=("git" "cmake" "build-essential" "python3") + +# Runtime Dependencies +deps=("libc6") + +sources=("git+https://github.com/diegoiast/fdbox.git") +checksums=("SKIP") + +version() { + cd "$srcdir/fdbox" + # Generates a version string like r123.abc1234 + printf "0.0.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + # 1. Create build directory + mkdir -p "$srcdir/fdbox/build" + cd "$srcdir/fdbox/build" + + # 2. Run CMake + # We run this in prepare() because it downloads dependencies (CPM) + # and requires internet access. + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release +} + +build() { + cd "$srcdir/fdbox/build" + # 3. Compile + make +} + +package() { + cd "$srcdir/fdbox/build" + + # 4. Install + # Try using the standard make install. + # The '||' operator ensures that if 'make install' fails (e.g., no target defined), + # we fall back to installing the binary manually. + make DESTDIR="$pkgdir" install || install -Dm755 fdbox "$pkgdir/usr/bin/fdbox" +} From 9f1281fd908b9f9e3ae143a98409023f13451aa8 Mon Sep 17 00:00:00 2001 From: "Foad S. Farimani" Date: Fri, 9 Jan 2026 21:36:27 +0100 Subject: [PATCH 2/3] Add yt-dlp-git package - Feature-rich youtube-dl fork with additional features and fixes - Pure Python package (architecture: all) - Includes workaround for Ubuntu's outdated hatchling/trove-classifiers - Based on AUR yt-dlp-git by katt --- .gitignore | 20 ++++++ yt-dlp-git/README.md | 156 +++++++++++++++++++++++++++++++++++++++++++ yt-dlp-git/lure.sh | 50 ++++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 .gitignore create mode 100644 yt-dlp-git/README.md create mode 100644 yt-dlp-git/lure.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c5ff206 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Built packages +*.deb +*.rpm +*.pkg.tar.* +*.apk + +# LURE build artifacts +*.tar.gz +*.tar.xz +*.tar.zst + +# Editor backups +*~ +*.swp +*.swo +.*.swp + +# OS files +.DS_Store +Thumbs.db diff --git a/yt-dlp-git/README.md b/yt-dlp-git/README.md new file mode 100644 index 0000000..9123e51 --- /dev/null +++ b/yt-dlp-git/README.md @@ -0,0 +1,156 @@ +# yt-dlp-git + +A [LURE](https://github.com/lure-sh/lure) package for [yt-dlp](https://github.com/yt-dlp/yt-dlp), a feature-rich command-line audio/video downloader and youtube-dl fork with additional features and fixes. + +## Package Information + +| Field | Value | +|-------|-------| +| Upstream | https://github.com/yt-dlp/yt-dlp | +| License | Unlicense | +| Architecture | `all` (pure Python) | +| Provides | `yt-dlp` | +| Conflicts | `yt-dlp` | + +Based on the [AUR yt-dlp-git package](https://aur.archlinux.org/packages/yt-dlp-git) by katt. + +## Building + +```bash +cd yt-dlp-git +lure build +``` + +## Installation + +```bash +sudo apt install ./yt-dlp-git_*.deb +``` + +This will automatically remove any existing `yt-dlp` package from the distribution repositories due to the `conflicts` declaration. + +## Verification + +```bash +yt-dlp --version +``` + +## Dependencies + +### Build Dependencies + +- `git` — for cloning and version detection +- `make` — for running build targets +- `pandoc` — for generating man pages and documentation +- `python3-all` — Python interpreter +- `python3-build` — PEP 517 build frontend +- `python3-installer` — for installing wheels +- `python3-wheel` — wheel support +- `python3-pip` — for installing newer build dependencies + +### Runtime Dependencies + +- `python3`, `python3-certifi`, `python3-requests`, `python3-urllib3` — core requirements +- `python3-mutagen` — metadata handling +- `python3-pycryptodome` — AES-128 HLS stream decryption +- `python3-websockets` — websocket download support +- `python3-brotli` — brotli content encoding +- `ffmpeg` — video/audio post-processing (essential for merging formats) + +## Lessons Learned + +### 1. Ubuntu/Debian packages can be too old for bleeding-edge Python projects + +**Problem:** yt-dlp's `pyproject.toml` requires `hatchling>=1.27.0`, but Ubuntu Noble (24.04) provides `python3-hatchling` version 1.21.0. + +**Error message:** +``` +ERROR Missing dependencies: + hatchling>=1.27.0 +``` + +**Solution:** Install newer build dependencies via pip during the build phase instead of relying on system packages: + +```bash +build_deps=("..." "python3-pip") # Add pip to build deps + +build() { + # Install newer hatchling that meets requirements + python3 -m pip install --user --break-system-packages "hatchling>=1.27.0" + ... +} +``` + +### 2. Trove classifiers must recognize new Python versions + +**Problem:** After fixing hatchling, the build failed because `trove-classifiers` (2024.1.31) didn't recognize `Programming Language :: Python :: 3.14`. + +**Error message:** +``` +ValueError: Unknown classifier in field `project.classifiers`: Programming Language :: Python :: 3.14 +``` + +**Solution:** Also install a newer `trove-classifiers` via pip: + +```bash +python3 -m pip install --user --break-system-packages \ + "hatchling>=1.27.0" \ + "trove-classifiers>=2024.10.0" +``` + +### 3. The `--break-system-packages` flag is required on modern Debian/Ubuntu + +PEP 668 introduced "externally managed environments" which prevents pip from modifying system Python packages by default. For build-time dependencies that won't persist after package installation, using `--break-system-packages` with `--user` is acceptable. + +### 4. Package conflicts and provides work correctly + +When `conflicts=("yt-dlp")` and `provides=("yt-dlp")` are declared: +- `apt` automatically removes the conflicting package during installation +- Reverse dependencies (like `hypnotix`) remain satisfied because the new package `provides` the same capability + +### 5. Version function for git packages + +The version function generates Debian-compatible versions from git tags: + +```bash +version() { + cd "$srcdir/yt-dlp" + git describe --long --tags --abbrev=7 --exclude=nightly | \ + sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} +``` + +This produces versions like `2025.12.08.r53.g27afb31` where: +- `2025.12.08` — latest tag +- `r53` — 53 commits since tag +- `g27afb31` — git commit hash + +### 6. Architecture `all` for pure Python packages + +Since yt-dlp is pure Python with no compiled extensions, using `architectures=("all")` produces a single `.deb` that works on any architecture (amd64, arm64, armhf, etc.). + +## AUR Discussion Notes + +From the [AUR comments](https://aur.archlinux.org/packages/yt-dlp-git) (as of 2025-11-15): + +- The `yt-dlp-ejs` optional dependency provides non-deprecated YouTube support +- Version pinning between `yt-dlp` and `yt-dlp-ejs` is a known complexity +- The check function may need `--deselect` for websocket tests until python-websockets updates + +## Optional Dependencies (not included by default) + +For additional functionality, consider installing: + +- `rtmpdump` — RTMP stream support +- `atomicparsley` — embedding thumbnails in m4a files +- `aria2` — external downloader support +- `phantomjs` — JavaScript-based extractors +- `python3-secretstorage` — browser cookie extraction (GNOME keyring) +- `python3-xattr` — xattr metadata support + +## See Also + +- [yt-dlp documentation](https://github.com/yt-dlp/yt-dlp#readme) +- [yt-dlp supported sites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) +- [LURE documentation](https://github.com/lure-sh/lure) +- [AUR yt-dlp-git](https://aur.archlinux.org/packages/yt-dlp-git) diff --git a/yt-dlp-git/lure.sh b/yt-dlp-git/lure.sh new file mode 100644 index 0000000..5f33677 --- /dev/null +++ b/yt-dlp-git/lure.sh @@ -0,0 +1,50 @@ +name="yt-dlp-git" +version="0.0.0" +release="1" +desc="A feature-rich command-line audio/video downloader" +homepage="https://github.com/yt-dlp/yt-dlp" +maintainer="Your Name " +architectures=("all") +license=("Unlicense") +provides=("yt-dlp") +conflicts=("yt-dlp") + +# Build Dependencies (Debian/Ubuntu names) +# NOTE: We exclude python3-hatchling because Ubuntu's version is too old +# We'll install hatchling via pip during build instead +build_deps=("git" "make" "pandoc" "python3-all" "python3-build" "python3-installer" "python3-wheel" "python3-pip") + +# Runtime Dependencies +deps=("python3" "python3-certifi" "python3-requests" "python3-urllib3" "python3-mutagen" "python3-pycryptodome" "python3-websockets" "python3-brotli" "ffmpeg") + +sources=("git+https://github.com/yt-dlp/yt-dlp.git") +checksums=("SKIP") + +version() { + cd "$srcdir/yt-dlp" + git describe --long --tags --abbrev=7 --exclude=nightly | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir/yt-dlp" + git clean -dfx +} + +build() { + cd "$srcdir/yt-dlp" + + # Install hatchling>=1.27.0 (Ubuntu's version is too old) + python3 -m pip install --user --break-system-packages "hatchling>=1.27.0" "trove-classifiers>=2024.10.0" + + # Ensure ~/.local/bin is in PATH for hatchling + export PATH="$HOME/.local/bin:$PATH" + + make pypi-files + python3 devscripts/make_lazy_extractors.py + python3 -m build --wheel --no-isolation +} + +package() { + cd "$srcdir/yt-dlp" + python3 -m installer --destdir="$pkgdir" dist/*.whl +} From d42a8f35e6d2cc2ff651116aabe0673636c5c86c Mon Sep 17 00:00:00 2001 From: "Foad S. Farimani" Date: Wed, 14 Jan 2026 22:49:48 +0100 Subject: [PATCH 3/3] feat: add llama.cpp-vulkan-git package - LLM inference with Vulkan GPU backend (FLOSS alternative to CUDA) - Includes systemd service for running as server - Fixed glslc dependency (critical for Vulkan shader compilation) - Debian-compliant versioning (0.0.BUILD.rCOMMITS.HASH) --- llama.cpp-vulkan-git/README.md | 68 ++++++++++ llama.cpp-vulkan-git/lure.sh | 220 +++++++++++++++++++++++++++++++++ 2 files changed, 288 insertions(+) create mode 100644 llama.cpp-vulkan-git/README.md create mode 100644 llama.cpp-vulkan-git/lure.sh diff --git a/llama.cpp-vulkan-git/README.md b/llama.cpp-vulkan-git/README.md new file mode 100644 index 0000000..9574dde --- /dev/null +++ b/llama.cpp-vulkan-git/README.md @@ -0,0 +1,68 @@ +# llama.cpp-vulkan-git + +LURE package for [llama.cpp](https://github.com/ggml-org/llama.cpp) with Vulkan GPU backend. + +## Features + +- **Vulkan GPU acceleration** using open-source Mesa drivers (RADV, ANV, NVK) +- **No proprietary blobs** required (unlike CUDA) +- **Heterogeneous inference** - offload layers to GPU while keeping rest on CPU +- **Systemd service** included for running as a server + +## Dependencies + +### Build +- `libvulkan-dev` - Vulkan headers and loader +- `glslc` - SPIR-V shader compiler (**critical** - from shaderc package) +- `glslang-tools` - Additional GLSL tools + +### Runtime +- `libvulkan1` - Vulkan loader +- `mesa-vulkan-drivers` - Open-source Vulkan drivers + +## Installation + +```bash +# Install build dependencies first +sudo apt install libvulkan-dev glslc glslang-tools vulkan-tools + +# Build with LURE +lure build + +# Install the generated .deb +sudo apt install ./llama.cpp-vulkan-git_*.deb +``` + +## Quick Start + +```bash +# Verify Vulkan support +vulkaninfo --summary + +# List available compute devices +llama-cli --list-devices + +# Run a model (auto-downloads from HuggingFace) +llama-cli -hf ggml-org/gemma-3-1b-it-GGUF -p "Hello!" -ngl 99 + +# Start the server +sudo systemctl enable --now llama.cpp +# Edit /etc/conf.d/llama.cpp to set your model path +``` + +## Systemd Service + +Configuration file: `/etc/conf.d/llama.cpp` + +```bash +# Start/stop +sudo systemctl start llama.cpp +sudo systemctl stop llama.cpp + +# View logs +journalctl -u llama.cpp -f +``` + +## License + +MIT (same as llama.cpp) diff --git a/llama.cpp-vulkan-git/lure.sh b/llama.cpp-vulkan-git/lure.sh new file mode 100644 index 0000000..7b24efb --- /dev/null +++ b/llama.cpp-vulkan-git/lure.sh @@ -0,0 +1,220 @@ +#!/bin/bash +# LURE build script for llama.cpp with Vulkan backend +# Maintainer: Foad Sojoodi Farimani + +name="llama.cpp-vulkan-git" +version="0.0.0" # Will be overridden by version() +release="1" +desc="Port of Facebook's LLaMA model in C/C++ (with Vulkan GPU optimizations)" +homepage="https://github.com/ggml-org/llama.cpp" +maintainer="Foad Sojoodi Farimani " +architectures=("amd64" "arm64" "armv7h") +license=("MIT") +provides=("llama.cpp" "llama-server" "llama-cli" "llama-bench" "llama-quantize") +conflicts=("llama.cpp") +replaces=("llama.cpp") + +# Build Dependencies +# CRITICAL: 'glslc' is the standalone SPIR-V compiler package +# libshaderc-dev provides the library, but NOT the glslc binary +# The CMake FindVulkan module specifically looks for the 'glslc' executable +build_deps_apt=( + "git" + "cmake" + "build-essential" + "pkg-config" + "libvulkan-dev" # Vulkan headers and loader + "glslc" # SPIR-V shader compiler (from shaderc) - REQUIRED! + "glslang-tools" # Additional GLSL tools (glslangValidator) + "vulkan-tools" # vulkaninfo for testing + "libcurl4-openssl-dev" # For model downloading +) + +build_deps_pacman=( + "git" + "cmake" + "base-devel" + "pkg-config" + "vulkan-headers" + "vulkan-icd-loader" + "shaderc" # Provides glslc on Arch + "glslang" + "vulkan-tools" + "curl" +) + +# Runtime Dependencies +deps_apt=( + "libvulkan1" # Vulkan loader + "mesa-vulkan-drivers" # Open-source Vulkan drivers (RADV, ANV, etc.) + "libcurl4" +) + +deps_pacman=( + "vulkan-icd-loader" + "mesa" # Includes Vulkan drivers + "curl" +) + +# Optional dependencies for model conversion +optdeps_apt=( + "python3-numpy: convert_hf_to_gguf.py script" + "python3-torch: convert_hf_to_gguf.py script" +) + +sources=("git+https://github.com/ggml-org/llama.cpp.git") +checksums=("SKIP") + +version() { + cd "$srcdir/llama.cpp" + # Debian requires version to start with a digit + # Transform b7735-3-gd98b548120 -> 0.0.7735.r3.d98b548120 + # The 'b' prefix becomes part of the version number after 0.0. + local ver + ver="$(git describe --tags --long 2>/dev/null)" + # Remove leading 'b', convert to: 0.0.BUILD.rCOMMITS.HASH + printf "%s" "$(echo "$ver" | sed 's/^b//; s/\([^-]*\)-\([^-]*\)-g\(.*\)/0.0.\1.r\2.\3/')" +} + +prepare() { + cd "$srcdir/llama.cpp" + + # Initialize and update submodules if any + git submodule update --init --recursive 2>/dev/null || true + + # --- Generate Default Config File --- + cat > "$srcdir/llama.cpp.conf" << 'CONFEOF' +# Configuration for llama.cpp systemd service +# Edit this file, then run: sudo systemctl restart llama.cpp + +# Model path (REQUIRED - set this to your model file) +LLAMA_MODEL="/var/lib/llama.cpp/models/default.gguf" + +# Server address and port +LLAMA_HOST="127.0.0.1" +LLAMA_PORT="8080" + +# GPU Layers to offload (set to 999 to offload all layers) +# Set to 0 for CPU-only inference +LLAMA_N_GPU_LAYERS="999" + +# Context size (0 = use model default) +LLAMA_CTX_SIZE="0" + +# Number of threads for CPU computation (0 = auto) +LLAMA_THREADS="0" + +# Additional arguments (see llama-server --help) +# Examples: --embedding --metrics --flash-attn +LLAMA_ARGS="" +CONFEOF + + # --- Generate Systemd Service File --- + cat > "$srcdir/llama.cpp.service" << 'SERVICEEOF' +[Unit] +Description=Llama.cpp Inference Server (Vulkan) +Documentation=https://github.com/ggml-org/llama.cpp +After=network.target + +[Service] +Type=simple +User=nobody +Group=nogroup +EnvironmentFile=/etc/conf.d/llama.cpp + +# Create model directory if it doesn't exist +ExecStartPre=/bin/mkdir -p /var/lib/llama.cpp/models + +ExecStart=/usr/bin/llama-server \ + --model "${LLAMA_MODEL}" \ + --host "${LLAMA_HOST}" \ + --port "${LLAMA_PORT}" \ + --n-gpu-layers "${LLAMA_N_GPU_LAYERS}" \ + --ctx-size "${LLAMA_CTX_SIZE}" \ + --threads "${LLAMA_THREADS}" \ + ${LLAMA_ARGS} + +Restart=on-failure +RestartSec=5 + +# Security hardening +NoNewPrivileges=true +ProtectSystem=strict +ProtectHome=true +ReadWritePaths=/var/lib/llama.cpp +PrivateTmp=true + +[Install] +WantedBy=multi-user.target +SERVICEEOF + + # --- Generate README for users --- + cat > "$srcdir/README.post-install" << 'READMEEOF' +llama.cpp with Vulkan backend installed successfully! + +QUICK START: +============ + +1. Test Vulkan support: + vulkaninfo --summary + +2. List available devices: + llama-cli --list-devices + +3. Download and run a model: + llama-cli -hf ggml-org/gemma-3-1b-it-GGUF -p "Hello, world!" -ngl 99 + +4. Start the server: + sudo systemctl enable --now llama.cpp + # Edit /etc/conf.d/llama.cpp first to set your model path + +For more information: https://github.com/ggml-org/llama.cpp +READMEEOF +} + +build() { + cd "$srcdir/llama.cpp" + + # Clean any previous build + rm -rf build + + # Configure with CMake + # Note: LLAMA_CURL is deprecated, curl support is automatic if libcurl is found + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DGGML_VULKAN=ON \ + -DGGML_NATIVE=ON \ + -DLLAMA_BUILD_TESTS=OFF \ + -DLLAMA_BUILD_EXAMPLES=ON \ + -DLLAMA_BUILD_SERVER=ON + + # Build with all available cores + cmake --build build --config Release -j"$(nproc)" +} + +package() { + cd "$srcdir/llama.cpp" + + # Install using CMake + DESTDIR="$pkgdir" cmake --install build + + # Install configuration file + install -Dm644 "$srcdir/llama.cpp.conf" \ + "$pkgdir/etc/conf.d/llama.cpp" + + # Install systemd service + install -Dm644 "$srcdir/llama.cpp.service" \ + "$pkgdir/usr/lib/systemd/system/llama.cpp.service" + + # Install license + install -Dm644 "$srcdir/llama.cpp/LICENSE" \ + "$pkgdir/usr/share/licenses/$name/LICENSE" + + # Install documentation + install -Dm644 "$srcdir/README.post-install" \ + "$pkgdir/usr/share/doc/$name/README" + + # Create model directory (will be owned by nobody:nogroup when service runs) + install -dm755 "$pkgdir/var/lib/llama.cpp/models" +}