diff --git a/.gitignore b/.gitignore index ebc3e93..5256f77 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ */pkg/ *.deb *.AppImage +*.flatpak diff --git a/README.md b/README.md index 6d08c99..2b935d3 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ source in the `PKGBUILD` (and drop the `-bin` suffix), or don't package it. | `plezy-bin` | [edde746/plezy](https://github.com/edde746/plezy) — Plex, Jellyfin and Emby client (Flutter); the source package [lives in `extra`](https://archlinux.org/packages/extra/x86_64/plezy/) | `.deb` | [plezy-bin](https://aur.archlinux.org/packages/plezy-bin) | | `sharpemu-bin` | [sharpemu/sharpemu](https://github.com/sharpemu/sharpemu) — experimental PlayStation 5 emulator | tarball | [sharpemu-bin](https://aur.archlinux.org/packages/sharpemu-bin) | | `snapx-bin` | [SnapXL/SnapX](https://github.com/SnapXL/SnapX) — ShareX-fork screenshot/sharing tool | self-contained tarball | [snapx-bin](https://aur.archlinux.org/packages/snapx-bin) | +| `tenzen-studio-bin` | [tenzen.studio](https://tenzen.studio) — Tenzen Studio, screen recorder and editor for product demos (proprietary Electron app) | Flatpak bundle | [tenzen-studio-bin](https://aur.archlinux.org/packages/tenzen-studio-bin) | | `timetable` | [ostfriese4/untis](https://codeberg.org/ostfriese4/untis) — "Timetable", a GTK4 + LibAdwaita client for WebUntis | *built from source* | [timetable](https://aur.archlinux.org/packages/timetable) | | `vacuumtube-bin` | [shy1132/VacuumTube](https://github.com/shy1132/VacuumTube) — YouTube Leanback (TV UI) with built-in adblocker | `.deb` | [vacuumtube-bin](https://aur.archlinux.org/packages/vacuumtube-bin) | | `waydroid-helper-bin` | [ayasa520/waydroid-helper](https://github.com/ayasa520/waydroid-helper) — GTK4 GUI for Waydroid configuration and extensions | AppImage | [waydroid-helper-bin](https://aur.archlinux.org/packages/waydroid-helper-bin) | @@ -104,7 +105,8 @@ Then create a directory named after the AUR package containing: it via the GitHub API here and sync an `_asset` variable in the `PKGBUILD` too. - `BUILD_DEPS` — optional array of Arch packages to install before the CI - test build; only needed by packages that build from source. + test build; only needed by packages that build from source or need a + tool to unpack upstream's deliverable (`tenzen-studio-bin`: `ostree`). - `AUR_PUBLISH` — optional; set to `false` to keep a package out of the AUR while it is still being prepared. Everything else still runs, so the `PKGBUILD` is kept current and test-built; only the publishing waits. diff --git a/scripts/update-package.sh b/scripts/update-package.sh index 959bd3d..b19141c 100644 --- a/scripts/update-package.sh +++ b/scripts/update-package.sh @@ -106,7 +106,7 @@ mv "$pkg/.SRCINFO.new" "$pkg/.SRCINFO" # drop downloaded sources and build leftovers (all gitignored, never tracked) rm -rf "$pkg/src" "$pkg/pkg" rm -f "$pkg"/*.pkg.tar.* "$pkg"/*.tar.zst "$pkg"/*.tar.gz "$pkg"/*.tar.bz2 \ - "$pkg"/*.deb "$pkg"/*.AppImage + "$pkg"/*.deb "$pkg"/*.AppImage "$pkg"/*.flatpak ### 4: commit back to this repository ######################################## diff --git a/tenzen-studio-bin/.SRCINFO b/tenzen-studio-bin/.SRCINFO new file mode 100644 index 0000000..1dd388e --- /dev/null +++ b/tenzen-studio-bin/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = tenzen-studio-bin + pkgdesc = Record and edit product demos: cut pauses, add zooms and captions (upstream Flatpak bundle) + pkgver = 0.1.26 + pkgrel = 1 + url = https://tenzen.studio + arch = x86_64 + license = LicenseRef-proprietary + makedepends = ostree + makedepends = asar + depends = gtk3 + depends = nss + depends = alsa-lib + depends = ffmpeg + depends = python-xlib + optdepends = libpulse: record system audio + provides = tenzen-studio + conflicts = tenzen-studio + noextract = Tenzen-0.1.26-linux-x64.flatpak + options = !strip + options = !debug + source = Tenzen-0.1.26-linux-x64.flatpak::https://downloads.tenzen.studio/desktop/stable/linux/0.1.26/Tenzen-0.1.26-linux-x64.flatpak + sha256sums = 172496d25807dc54bf0313594f198834ba4fa3df0c29ee5265b13f2fca07c093 + +pkgname = tenzen-studio-bin diff --git a/tenzen-studio-bin/PKGBUILD b/tenzen-studio-bin/PKGBUILD new file mode 100644 index 0000000..ff9e572 --- /dev/null +++ b/tenzen-studio-bin/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Felitendo +# This PKGBUILD is updated automatically: +# https://github.com/Felitendo/PKGBUILDS + +pkgname=tenzen-studio-bin +_pkgname=tenzen +pkgver=0.1.26 +pkgrel=1 +pkgdesc="Record and edit product demos: cut pauses, add zooms and captions (upstream Flatpak bundle)" +arch=('x86_64') +url="https://tenzen.studio" +license=('LicenseRef-proprietary') +depends=('gtk3' 'nss' 'alsa-lib' 'ffmpeg' 'python-xlib') +optdepends=('libpulse: record system audio') +makedepends=('ostree' 'asar') +provides=('tenzen-studio') +conflicts=('tenzen-studio') +options=('!strip' '!debug') +_bundle="Tenzen-${pkgver}-linux-x64.flatpak" +source=("${_bundle}::https://downloads.tenzen.studio/desktop/stable/linux/${pkgver}/${_bundle}") +noextract=("${_bundle}") +sha256sums=('172496d25807dc54bf0313594f198834ba4fa3df0c29ee5265b13f2fca07c093') + +prepare() { + # A Flatpak bundle is an OSTree static delta carrying a single commit: + # apply it to a throwaway repository and check that commit out. + rm -rf repo flatpak + ostree init --repo=repo --mode=bare-user-only + ostree static-delta apply-offline --repo=repo "${_bundle}" + + local _commit + _commit="$(find repo/objects -name '*.commit')" + _commit="$(basename "$(dirname "${_commit}")")$(basename "${_commit}" .commit)" + ostree checkout --repo=repo --user-mode "${_commit}" flatpak + + # the bundle exports no icon - the app's own is only inside app.asar + asar extract-file flatpak/files/lib/com.tenzen.desktop/resources/app.asar \ + dist/assets/brand/icon.png +} + +package() { + install -d "${pkgdir}/opt/${pkgname}" + cp -a "${srcdir}/flatpak/files/lib/com.tenzen.desktop/." "${pkgdir}/opt/${pkgname}/" + + install -d "${pkgdir}/usr/bin" + ln -s "/opt/${pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + + # named after the app's desktopName, so windows are matched to the entry + install -Dm644 "${srcdir}/flatpak/files/share/applications/com.tenzen.desktop.desktop" \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + sed -i \ + -e "s|^Exec=.*|Exec=${_pkgname} %U|" \ + -e "s|^Icon=.*|Icon=${_pkgname}|" \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + + # 1024x1024, which the hicolor theme has no directory for + install -Dm644 "${srcdir}/icon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png" +} diff --git a/tenzen-studio-bin/pkg.sh b/tenzen-studio-bin/pkg.sh new file mode 100644 index 0000000..51d9ca0 --- /dev/null +++ b/tenzen-studio-bin/pkg.sh @@ -0,0 +1,33 @@ +# tenzen-studio-bin - Tenzen Studio (https://tenzen.studio), a proprietary +# Electron app for recording and editing product demos. +# +# Upstream publishes no source, so there is only this -bin package. For Linux +# it ships nothing but a Flatpak bundle, versioned on its own download host: +# the PKGBUILD unpacks that with ostree (a Flatpak bundle is an OSTree static +# delta) and takes the icon out of app.asar, so the test build needs both. +# +# The release API names the current version and lists every artifact with its +# sha256, so nothing has to be downloaded to refresh the checksum - makepkg's +# test build verifies it against the real download anyway. + +API="https://tenzen.studio/api/v1/desktop/releases/latest?channel=stable" + +BUILD_DEPS=(ostree asar) + +latest_version() { + curl -sf "$API" | jq -r '.release.version' +} + +# refresh_checksums +refresh_checksums() { + local ver="$1" pkgbuild="$2" sha + + sha="$(curl -sf "$API" | jq -r --arg f "Tenzen-$ver-linux-x64.flatpak" \ + '.release.artifacts[] | select(.file_name == $f) | .sha256')" + if [[ ! "$sha" =~ ^[0-9a-f]{64}$ ]]; then + echo "the release API lists no Tenzen-$ver-linux-x64.flatpak" >&2 + return 1 + fi + + sed -i "s|^sha256sums=.*|sha256sums=('$sha')|" "$pkgbuild" +}