Ships beyond the Arch PKGBUILD so non-Arch users can install without a Rust toolchain. ## Package metadata (Cargo.toml) - [package.metadata.deb] for cargo-deb: declares the runtime subprocess deps (yt-dlp, ffmpeg, mpv, xdg-utils) that auto-detection can't find, plus libxcb1/libc6 link deps and libnotify4 as recommended. - [package.metadata.generate-rpm] for cargo-generate-rpm with the RPM-distro dep names. - Filled in license / repository / authors / readme package fields. ## scripts/package.sh One entry point: `scripts/package.sh [deb|rpm|appimage|all]`. Builds the release binary once and reuses it. Installs cargo-deb / cargo-generate-rpm on demand; downloads appimagetool to dist/tools/ on first AppImage build. Per-format failures are isolated and summarized at the end rather than aborting the run. Output to dist/ (gitignored). AppImage is hand-rolled (AppDir + AppRun + root desktop/icon) and bundles only the GUI binary's shared-lib closure — yt-dlp/ffmpeg/mpv stay host PATH deps, same as the package declarations. ## CI .forgejo/workflows/release.yml builds all formats on a v* tag push and attaches them to the Codeberg release via actions/forgejo-release. Manual workflow_dispatch builds without uploading for smoke testing. Sets APPIMAGE_EXTRACT_AND_RUN since CI containers lack FUSE. ## docs/PACKAGING.md Per-format build + install instructions, the Arch PKGBUILD pointer, and an honest Windows/macOS section: both are blocked on the Linux-only tray (ksni) + file-picker (rfd xdg-portal) deps needing per-OS abstraction. The rest of the stack already cross-compiles. Verified .deb (dpkg control + payload correct) and .rpm (payload correct) build cleanly through the script on this host. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
93 lines
4.6 KiB
TOML
93 lines
4.6 KiB
TOML
[package]
|
|
name = "yt-offline"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Self-hosted archive for YouTube, TikTok, Twitch, Vimeo, Bandcamp, SoundCloud, Odysee and more. Desktop GUI + web UI, bundled yt-dlp with curl_cffi impersonation, Plex export, SQLite-backed resume tracking. AGPL-3.0."
|
|
license = "AGPL-3.0-only"
|
|
repository = "https://codeberg.org/anassaeneroi/yt-offline"
|
|
homepage = "https://codeberg.org/anassaeneroi/yt-offline"
|
|
authors = ["InannaBeloved <anassaeneroi@pm.me>"]
|
|
readme = "README.md"
|
|
|
|
[dependencies]
|
|
eframe = "0.29"
|
|
image = { version = "0.25", default-features = false, features = ["webp", "jpeg", "png"] }
|
|
toml = "0.8"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
r2d2 = "0.8"
|
|
r2d2_sqlite = "0.24"
|
|
notify-rust = { version = "4", default-features = false, features = ["z"] }
|
|
axum = { version = "0.7", features = ["macros", "ws"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
tokio-util = { version = "0.7", features = ["io"] }
|
|
tokio-stream = "0.1"
|
|
tower-http = { version = "0.5", features = ["cors", "fs", "compression-gzip"] }
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
# File-picker dialog for the desktop GUI. xdg-portal backend keeps it pure-Rust
|
|
# (zbus, no GTK/libdbus build dep), consistent with notify-rust above.
|
|
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
|
|
ksni = { version = "0.3.4", features = ["tokio"] }
|
|
libc = "0.2.186"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
# Thin LTO does cross-crate inlining without the rust-lld + bundled-sqlite
|
|
# link breakage that full `lto = true` triggered (the previous !lto note
|
|
# was about full LTO; thin works with the current toolchain). Worth ~5-10%
|
|
# on hot paths.
|
|
lto = "thin"
|
|
# Codegen-units = 1 trades build time (~30s extra) for tighter inlining
|
|
# across the whole crate. Worth it for release binaries.
|
|
codegen-units = 1
|
|
# Strip debuginfo from release binaries — cuts binary size by ~30 MB
|
|
# without affecting runtime. The crash log still captures backtraces at
|
|
# runtime; those are less informative without symbols but usable with
|
|
# addr2line against the unstripped build artifact.
|
|
strip = "debuginfo"
|
|
|
|
# ── Debian / Ubuntu package (cargo-deb) ──────────────────────────────────────
|
|
# `cargo deb` reads this to build a .deb. Runtime deps mirror the PKGBUILD:
|
|
# yt-dlp + ffmpeg + mpv are invoked as subprocesses, xdg-utils provides
|
|
# xdg-open, and libxcb is needed by the eframe/winit windowing stack.
|
|
[package.metadata.deb]
|
|
maintainer = "InannaBeloved <anassaeneroi@pm.me>"
|
|
copyright = "2026, InannaBeloved <anassaeneroi@pm.me>"
|
|
license-file = ["LICENSE", "0"]
|
|
extended-description = """\
|
|
Self-hosted archive for YouTube, TikTok, Twitch, Vimeo, Bandcamp, \
|
|
SoundCloud, Odysee and more. Ships a desktop GUI and a mobile-friendly \
|
|
web UI, with a bundled yt-dlp (curl_cffi impersonation), Plex export, \
|
|
and SQLite-backed resume tracking."""
|
|
section = "video"
|
|
priority = "optional"
|
|
# yt-dlp / ffmpeg / mpv are runtime subprocess deps, not link-time, so
|
|
# cargo-deb's auto-detection won't find them — list explicitly. libxcb
|
|
# is the one shared library the GUI actually dlopens.
|
|
depends = "libc6, libxcb1, yt-dlp, ffmpeg, mpv, xdg-utils"
|
|
recommends = "libnotify4"
|
|
assets = [
|
|
["target/release/yt-offline", "usr/bin/", "755"],
|
|
["youtube-backup.desktop", "usr/share/applications/yt-offline.desktop", "644"],
|
|
["icon.png", "usr/share/pixmaps/yt-offline.png", "644"],
|
|
["README.md", "usr/share/doc/yt-offline/README.md", "644"],
|
|
]
|
|
|
|
# ── Fedora / RHEL / openSUSE package (cargo-generate-rpm) ─────────────────────
|
|
# `cargo generate-rpm` reads this. Run `cargo build --release` first; it
|
|
# packages the already-built binary rather than building itself.
|
|
[package.metadata.generate-rpm]
|
|
summary = "Self-hosted multi-platform video archiver with desktop + web UI"
|
|
license = "AGPLv3"
|
|
# RPM distro package names differ from Debian's. yt-dlp is `yt-dlp` on
|
|
# Fedora; ffmpeg lives in RPM Fusion but we still declare the dep.
|
|
requires = { yt-dlp = "*", ffmpeg = "*", mpv = "*", "xdg-utils" = "*" }
|
|
assets = [
|
|
{ source = "target/release/yt-offline", dest = "/usr/bin/yt-offline", mode = "755" },
|
|
{ source = "youtube-backup.desktop", dest = "/usr/share/applications/yt-offline.desktop", mode = "644" },
|
|
{ source = "icon.png", dest = "/usr/share/pixmaps/yt-offline.png", mode = "644" },
|
|
{ source = "README.md", dest = "/usr/share/doc/yt-offline/README.md", mode = "644" },
|
|
{ source = "LICENSE", dest = "/usr/share/licenses/yt-offline/LICENSE", mode = "644" },
|
|
]
|