From 529817323d3a448d95e34db7d9de9a544684b3bf Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Fri, 7 Aug 2026 20:09:30 -0400 Subject: [PATCH] add MIT license, podtui-bin AUR PKGBUILD, fix README install sections --- LICENSE | 30 ++++++++++++++++++ README.md | 17 +++++----- packaging/aur/.SRCINFO | 33 ++++++++++++++++++++ packaging/aur/PKGBUILD | 42 +++++++++++++++++++++++++ packaging/aur/gen-srcinfo.sh | 60 ++++++++++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 7 deletions(-) create mode 100644 LICENSE create mode 100644 packaging/aur/.SRCINFO create mode 100644 packaging/aur/PKGBUILD create mode 100644 packaging/aur/gen-srcinfo.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c8e2b77 --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +MIT License + +Copyright (c) 2026 Michael Freno + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +This project bundles third-party components under their own licenses: + +- **cava** (karlstav/cava, vendored under `cava/`) — MIT, + Copyright (c) 2015 Karl Stavestrand. See `cava/LICENSE-cava.txt`. +- **Bun runtime** (embedded in the standalone binary) — MIT. +- **OpenTUI** (`@opentui/core`) — MIT. \ No newline at end of file diff --git a/README.md b/README.md index ee24e70..007e8ce 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,11 @@ Grab `podtui--.tar.gz` from the latest put `podtui` on your `PATH`: ```bash -curl -sSL -o podtui.tar.gz \ +curl -sS -o /tmp/podtui.tar.gz \ https://github.com/mikefreno/podtui/releases/latest/download/podtui-linux-x64.tar.gz -tar -xzf podtui.tar.gz -sudo install -m755 podtui /usr/local/bin/podtui +sudo mkdir -p /opt/podtui +sudo tar -xzf /tmp/podtui.tar.gz -C /opt/podtui --strip-components=1 +sudo ln -sf /opt/podtui/podtui /usr/local/bin/podtui ``` > The tarball contains `podtui` plus `libopentui.` and @@ -79,11 +80,13 @@ sudo install -m755 podtui /usr/local/bin/podtui ### 3. Arch Linux (AUR) ```bash -yay -S podtui +yay -S podtui-bin ``` -or build from the PKGBUILD (`podtui-bin`). The package installs the released -binary and its sibling libraries. +Requires an AUR helper ([paru](https://github.com/morgan/paru)). The AUR +package (PKGBUILD lives in `packaging/aur/`) installs the released binary and +its two FFI sibling libraries into `/usr/lib/podtui/` with a `/usr/bin/podtui` +symlink, and pulls in `mpv` (the sole audio backend) as a dependency. ### 4. From source @@ -214,7 +217,7 @@ is no cross-compilation. ## License -TBD — choose and document a license before first release. +MIT. See [LICENSE](LICENSE). ## Related diff --git a/packaging/aur/.SRCINFO b/packaging/aur/.SRCINFO new file mode 100644 index 0000000..13a3654 --- /dev/null +++ b/packaging/aur/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = podtui-bin + pkgdesc = Terminal podcast and audio player with synchronized audio-waveform visualization + pkgver = 0.2.0 + pkgrel = 1 + url = https://github.com/mikefreno/podtui + arch = x86_64 + arch = aarch64 + license = MIT + depends = mpv + provides = podtui + conflicts = podtui + options = !strip + source_x86_64 = https://github.com/mikefreno/podtui/releases/download/v0.2.0/podtui-linux-x64.tar.gz + sha256sums_x86_64 = 5c2be309341bda9550ad7669b48d3f46341c687234ddfaa0c84a6a9177f049fc + source_aarch64 = https://github.com/mikefreno/podtui/releases/download/v0.2.0/podtui-linux-arm64.tar.gz + sha256sums_aarch64 = c9c22d3a18cd192f89fbd5ff712d3502c4de0cce7550156c6a0d48d76e56e0d5 + +pkgname = podtui-bin + pkgver = 0.2.0 + pkgrel = 1 + url = https://github.com/mikefreno/podtui + pkgdesc = Terminal podcast and audio player with synchronized audio-waveform visualization + arch = x86_64 + arch = aarch64 + license = MIT + depends = mpv + provides = podtui + conflicts = podtui + options = !strip + source_x86_64 = https://github.com/mikefreno/podtui/releases/download/v0.2.0/podtui-linux-x64.tar.gz + sha256sums_x86_64 = 5c2be309341bda9550ad7669b48d3f46341c687234ddfaa0c84a6a9177f049fc + source_aarch64 = https://github.com/mikefreno/podtui/releases/download/v0.2.0/podtui-linux-arm64.tar.gz + sha256sums_aarch64 = c9c22d3a18cd192f89fbd5ff712d3502c4de0cce7550156c6a0d48d76e56e0d5 diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD new file mode 100644 index 0000000..5392349 --- /dev/null +++ b/packaging/aur/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Michael Freno +# Contributor: Michael Freno +# podtui-bin — TUI podcast/audiobook player with synchronized audio-waveform +# visualization. Serves the official standalone release binary and its two FFI +# sibling libraries (libcavacore.so + libopentui.so) from GitHub Releases. +# +# The embedded Bun runtime is statically linked into the binary — no Bun, no +# fftw needed at runtime (fftw3 is linked statically into libcavacore.so). + +pkgname=podtui-bin +_pkgname=podtui +pkgver=0.2.0 +pkgrel=1 +pkgdesc="Terminal podcast and audio player with synchronized audio-waveform visualization" +url="https://github.com/mikefreno/podtui" +arch=('x86_64' 'aarch64') +license=('MIT') +depends=('mpv') # sole audio backend; no-op without it +provides=("${_pkgname}") +conflicts=("${_pkgname}") +options=('!strip') # standalone binary, pre-minified +source_x86_64=("https://github.com/mikefreno/podtui/releases/download/v${pkgver}/podtui-linux-x64.tar.gz") +source_aarch64=("https://github.com/mikefreno/podtui/releases/download/v${pkgver}/podtui-linux-arm64.tar.gz") +sha256sums_x86_64=('5c2be309341bda9550ad7669b48d3f46341c687234ddfaa0c84a6a9177f049fc') +sha256sums_aarch64=('c9c22d3a18cd192f89fbd5ff712d3502c4de0cce7550156c6a0d48d76e56e0d5') + +package() { + local libdir + + case "$CARCH" in + x86_64) libdir="podtui-linux-x64" ;; + aarch64) libdir="podtui-linux-arm64" ;; + esac + + # Binary + native FFI libs must stay side by side in /usr/lib/podtui/; + # a /usr/bin symlink works because the embedded Bun runtime resolves + # process.execPath through symlinks (verified against the compiled binary). + install -Dm755 "${srcdir}/${libdir}/podtui" "${pkgdir}/usr/lib/podtui/podtui" + install -Dm644 "${srcdir}/${libdir}/libcavacore.so" "${pkgdir}/usr/lib/podtui/libcavacore.so" + install -Dm644 "${srcdir}/${libdir}/libopentui.so" "${pkgdir}/usr/lib/podtui/libopentui.so" + ln -s /usr/lib/podtui/podtui "${pkgdir}/usr/bin/podtui" +} \ No newline at end of file diff --git a/packaging/aur/gen-srcinfo.sh b/packaging/aur/gen-srcinfo.sh new file mode 100644 index 0000000..8df3977 --- /dev/null +++ b/packaging/aur/gen-srcinfo.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# gen-srcinfo.sh — emit .SRCINFO for the podtui-bin PKGBUILD without makepkg. +# Emits the same field set/ordering makepkg --printsrcinfo produces for this +# PKGBUILD shape (single package, per-arch source + sha256sums arrays). +set -euo pipefail + +cd "$(dirname "$0")" + +# shellcheck disable=SC1091 +. ./PKGBUILD + +emit() { printf '\t%s = %s\n' "$1" "$2"; } +emit_multi() { # $1 field, rest values + local f="$1" + shift + for v in "$@"; do emit "$f" "$v"; done +} + +pkgbase_section() { + echo "pkgbase = ${pkgname}" + for f in pkgdesc pkgver pkgrel url; do + v="${!f}" + [ -n "${v:-}" ] && emit "$f" "$v" + done + [ -n "${install:-}" ] && emit install "$install" + [ "${#arch[@]}" -gt 0 ] && emit_multi arch "${arch[@]}" + [ "${#license[@]}" -gt 0 ] && emit_multi license "${license[@]}" + [ "${#depends[@]}" -gt 0 ] && emit_multi depends "${depends[@]}" + [ "${#provides[@]}" -gt 0 ] && emit_multi provides "${provides[@]}" + [ "${#conflicts[@]}" -gt 0 ] && emit_multi conflicts "${conflicts[@]}" + [ "${#options[@]}" -gt 0 ] && emit_multi options "${options[@]}" + emit_arch_arrays +} + +emit_arch_arrays() { + for a in "${arch[@]}"; do + src_name="source_${a}" + sha_name="sha256sums_${a}" + src_val="${src_name}[@]" + sha_val="${sha_name}[@]" + [ "${#src_name}" -gt 0 ] && emit_multi "source_${a}" "${!src_val}" + emit_multi "sha256sums_${a}" "${!sha_val}" + done +} + +pkgbase_section +echo "" +echo "pkgname = ${pkgname}" +for v in pkgver pkgrel url; do + val="${!v}" + [ -n "${val:-}" ] && emit "$v" "$val" +done +emit pkgdesc "$pkgdesc" +[ "${#arch[@]}" -gt 0 ] && emit_multi arch "${arch[@]}" +[ "${#license[@]}" -gt 0 ] && emit_multi license "${license[@]}" +[ "${#depends[@]}" -gt 0 ] && emit_multi depends "${depends[@]}" +[ "${#provides[@]}" -gt 0 ] && emit_multi provides "${provides[@]}" +[ "${#conflicts[@]}" -gt 0 ] && emit_multi conflicts "${conflicts[@]}" +[ "${#options[@]}" -gt 0 ] && emit_multi options "${options[@]}" +emit_arch_arrays