concat, concat-bin, concat-git: adapt to upstream's 0.2.3 layout
This commit is contained in:
1 parent
c262539617
commit
555756fb25
10 files changed
+138
-101
No files matched your search
+8
-3
@@ -1,9 +1,10 @@
|
||||
pkgbase = concat-bin
|
||||
pkgdesc = Free and open-source CapCut replacement, a video editor with a Rust engine (upstream binary)
|
||||
pkgver = 0.2.2
|
||||
pkgver = 0.2.3
|
||||
pkgrel = 1
|
||||
url = https://github.com/jub0t/Concat
|
||||
arch = x86_64
|
||||
arch = aarch64
|
||||
license = AGPL-3.0-or-later
|
||||
license = GPL-3.0-or-later
|
||||
depends = alsa-lib
|
||||
@@ -23,9 +24,13 @@ pkgbase = concat-bin
|
||||
depends = hicolor-icon-theme
|
||||
provides = concat
|
||||
conflicts = concat
|
||||
noextract = concat-bin-0.2.3-x86_64.deb
|
||||
noextract = concat-bin-0.2.3-aarch64.deb
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = concat-bin-0.2.2.tar.gz::https://github.com/jub0t/Concat/releases/download/v0.2.2/Concat-0.2.2-linux-x86_64.tar.gz
|
||||
sha256sums = 9151e36948773b3d0d02256f1a8ee44580eec5d1fe48fdb31c2da3b2250a39ff
|
||||
source_x86_64 = concat-bin-0.2.3-x86_64.deb::https://github.com/jub0t/Concat/releases/download/v0.2.3/Concat-0.2.3-linux-x86_64.deb
|
||||
sha256sums_x86_64 = 01d2fb58521038a426429f1543ab2ec2359aa428a9dfd1b8948ce97b7d79c6c3
|
||||
source_aarch64 = concat-bin-0.2.3-aarch64.deb::https://github.com/jub0t/Concat/releases/download/v0.2.3/Concat-0.2.3-linux-aarch64.deb
|
||||
sha256sums_aarch64 = 3bd3f6bcfb165141b50b1ca2d3ab1b070f7e5a0e9f86a3c9ec121c4b5085a220
|
||||
|
||||
pkgname = concat-bin
|
||||
+40
-41
@@ -3,63 +3,62 @@
|
||||
# https://github.com/Felitendo/PKGBUILDS
|
||||
|
||||
pkgname=concat-bin
|
||||
pkgver=0.2.2
|
||||
pkgver=0.2.3
|
||||
pkgrel=1
|
||||
pkgdesc="Free and open-source CapCut replacement, a video editor with a Rust engine (upstream binary)"
|
||||
arch=('x86_64')
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/jub0t/Concat"
|
||||
# The binary is Concat under the AGPL; the FFmpeg libraries it ships beside
|
||||
# itself are a BtbN GPL build. Both licence texts land in the package: the
|
||||
# itself are a GPL build. Both licence texts land in the package: the
|
||||
# repository's LICENSE, and upstream's notices file, which is what names the
|
||||
# terms of everything linked in - FFmpeg, Slint under its GPL option,
|
||||
# whisper.cpp, sherpa-onnx.
|
||||
license=('AGPL-3.0-or-later' 'GPL-3.0-or-later')
|
||||
# Nothing is spawned at run time any more: FFmpeg is linked, whisper.cpp and
|
||||
# sherpa-onnx are compiled in. What is left is what the binary loads - the
|
||||
# ALSA backend of cpal, fontconfig and freetype for text, and the windowing
|
||||
# libraries winit and the renderer open by name: EGL, Wayland, X11 and
|
||||
# xkbcommon. dbus is the XDG portal, which is how the file dialogs and
|
||||
# "reveal in file manager" work without a toolkit.
|
||||
# Nothing is spawned at run time: FFmpeg is linked, whisper.cpp and
|
||||
# sherpa-onnx are compiled in, and ONNX Runtime ships in the same lib/
|
||||
# directory. What is left is what the binary loads by name - the ALSA backend
|
||||
# of cpal, fontconfig and freetype for text, and the windowing libraries
|
||||
# winit and the renderer open: EGL, Wayland, X11 and xkbcommon. dbus is the
|
||||
# XDG portal, which is how the file dialogs and "reveal in file manager" work
|
||||
# without a toolkit.
|
||||
depends=('alsa-lib' 'fontconfig' 'freetype2' 'libglvnd' 'libxkbcommon'
|
||||
'libxkbcommon-x11' 'libx11' 'libxcursor' 'libxi' 'libxrender'
|
||||
'wayland' 'dbus' 'gcc-libs' 'glibc' 'hicolor-icon-theme')
|
||||
provides=('concat')
|
||||
conflicts=('concat')
|
||||
# !strip: upstream's binary is already stripped, and the FFmpeg libraries
|
||||
# beside it are theirs to ship as they are.
|
||||
# !strip: upstream's binary is already stripped, and the FFmpeg and ONNX
|
||||
# Runtime libraries beside it are theirs to ship as they are.
|
||||
options=('!strip' '!debug')
|
||||
# Upstream's Linux release is one self-contained folder: the binary, the
|
||||
# FFmpeg 8.1 runtime libraries it was linked against, a desktop entry and an
|
||||
# icon. The libraries have to come along - the binary needs libavcodec.so.62
|
||||
# and Arch is on FFmpeg 9 (libavcodec.so.63) - so the whole folder is
|
||||
# installed under /usr/lib/$pkgname, where the binary's own rpath
|
||||
# ($ORIGIN/lib) finds them.
|
||||
# Upstream's Linux packages carry one self-contained folder: the binary and
|
||||
# the libraries it was linked against - FFmpeg 8 (Arch is on 9) and ONNX
|
||||
# Runtime, the cutout models' runtime. They go to /opt/concat, where the
|
||||
# binary's own rpath ($ORIGIN/lib) finds them, which is also where upstream's
|
||||
# .deb puts them and what its desktop entry points at.
|
||||
#
|
||||
# The asset name carries the workspace's version rather than the tag (a
|
||||
# prerelease of 0.2.2 ships Concat-0.2.2-linux-x86_64.tar.gz whatever its tag
|
||||
# says), so it is resolved through the GitHub API and synced here along with
|
||||
# the checksum; see pkg.sh.
|
||||
_tag="v0.2.2"
|
||||
_asset="Concat-0.2.2-linux-x86_64.tar.gz"
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/jub0t/Concat/releases/download/${_tag}/${_asset}")
|
||||
sha256sums=('9151e36948773b3d0d02256f1a8ee44580eec5d1fe48fdb31c2da3b2250a39ff')
|
||||
# Of the three Linux artifacts - .deb, .rpm and AppImage - the .deb is the
|
||||
# plain one: an ar archive around that folder, with no runtime wrapped around
|
||||
# it and nothing to mount.
|
||||
#
|
||||
# The asset name carries the workspace's version, not the tag (a prerelease of
|
||||
# 0.2.4 ships Concat-0.2.4-linux-x86_64.deb whatever its tag says), so both
|
||||
# the tag and that version are resolved through the release manifest and
|
||||
# synced here along with the checksums; see pkg.sh.
|
||||
_tag="v0.2.3"
|
||||
_relver="0.2.3"
|
||||
source_x86_64=("${pkgname}-${pkgver}-x86_64.deb::https://github.com/jub0t/Concat/releases/download/${_tag}/Concat-${_relver}-linux-x86_64.deb")
|
||||
source_aarch64=("${pkgname}-${pkgver}-aarch64.deb::https://github.com/jub0t/Concat/releases/download/${_tag}/Concat-${_relver}-linux-aarch64.deb")
|
||||
noextract=("${pkgname}-${pkgver}-x86_64.deb" "${pkgname}-${pkgver}-aarch64.deb")
|
||||
sha256sums_x86_64=('01d2fb58521038a426429f1543ab2ec2359aa428a9dfd1b8948ce97b7d79c6c3')
|
||||
sha256sums_aarch64=('3bd3f6bcfb165141b50b1ca2d3ab1b070f7e5a0e9f86a3c9ec121c4b5085a220')
|
||||
|
||||
package() {
|
||||
cd "${_asset%.tar.gz}"
|
||||
# -p: lib/ is the usual set of soname symlinks beside the real files, and
|
||||
# only an extraction that preserves them keeps the rpath working.
|
||||
bsdtar -xOf "$srcdir/${pkgname}-${pkgver}-${CARCH}.deb" 'data.tar.*' \
|
||||
| bsdtar -xpf - -C "$pkgdir" ./opt ./usr
|
||||
|
||||
install -Dm755 concat "$pkgdir/usr/lib/$pkgname/concat"
|
||||
# cp, not install: lib/ is the usual set of FFmpeg soname symlinks beside
|
||||
# the real files, and only a copy that preserves them keeps it working.
|
||||
cp -a lib "$pkgdir/usr/lib/$pkgname/lib"
|
||||
|
||||
install -d "$pkgdir/usr/bin"
|
||||
ln -s "/usr/lib/$pkgname/concat" "$pkgdir/usr/bin/concat"
|
||||
|
||||
install -Dm644 concat.desktop "$pkgdir/usr/share/applications/concat.desktop"
|
||||
install -Dm644 concat.png \
|
||||
"$pkgdir/usr/share/icons/hicolor/256x256/apps/concat.png"
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 THIRD_PARTY_NOTICES.md \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/THIRD_PARTY_NOTICES.md"
|
||||
# upstream ships them as documentation; on Arch they belong here
|
||||
install -d "$pkgdir/usr/share/licenses"
|
||||
mv "$pkgdir/usr/share/doc/concat" "$pkgdir/usr/share/licenses/$pkgname"
|
||||
rmdir "$pkgdir/usr/share/doc"
|
||||
}
|
||||
+33
-26
@@ -1,14 +1,14 @@
|
||||
# concat-bin - Concat (https://github.com/jub0t/Concat), a free and
|
||||
# open-source CapCut replacement.
|
||||
#
|
||||
# Upstream publishes a self-contained Linux tarball per release, so there is
|
||||
# no build step here: on a new version only pkgver, the asset name and the
|
||||
# checksum are refreshed and the PKGBUILD repackages the tarball.
|
||||
# Upstream builds the Linux release itself, so there is no build step here:
|
||||
# on a new version the tag, the asset version and the checksums are refreshed
|
||||
# and the PKGBUILD repackages upstream's .deb.
|
||||
#
|
||||
# 0.2.1 is the first release of the rewrite: the Tauri shell and its .deb are
|
||||
# gone, and the app is now one Rust binary (Slint over the engine crates)
|
||||
# shipped as Concat-<version>-linux-<arch>.tar.gz. The tag is what changed
|
||||
# least - see below.
|
||||
# 0.2.3 replaced the self-contained tarball this package used to take with a
|
||||
# .deb, an .rpm and an AppImage, each for x86_64 and aarch64. Every release
|
||||
# also carries a manifest.json listing each artifact with its sha256, so a
|
||||
# new version costs two API calls and no download.
|
||||
#
|
||||
# The release list is not ordered by version: GitHub sorts it by creation
|
||||
# time, and upstream's alpha numbering has run out of step with it before
|
||||
@@ -18,13 +18,12 @@
|
||||
# rolling "nightly" prerelease out.
|
||||
#
|
||||
# The asset name carries the workspace's version, not the tag - a prerelease
|
||||
# of 0.2.2 ships Concat-0.2.2-linux-x86_64.tar.gz whatever its tag says - so
|
||||
# it cannot be derived from pkgver and is resolved through the API into the
|
||||
# _asset variable.
|
||||
# of 0.2.4 ships Concat-0.2.4-linux-x86_64.deb whatever its tag says - so it
|
||||
# cannot be derived from pkgver and is read from the manifest into _relver.
|
||||
#
|
||||
# pkgver drops the hyphens from the tag (v0.2.2-alpha.1 -> 0.2.2alpha.1).
|
||||
# pacman sorts that older than a later plain 0.2.2 (`vercmp 0.2.2alpha.1
|
||||
# 0.2.2` is -1), so prereleases upgrade to the eventual release on their own
|
||||
# pkgver drops the hyphens from the tag (v0.2.4-alpha.1 -> 0.2.4alpha.1).
|
||||
# pacman sorts that older than a later plain 0.2.4 (`vercmp 0.2.4alpha.1
|
||||
# 0.2.4` is -1), so prereleases upgrade to the eventual release on their own
|
||||
# and no epoch is needed.
|
||||
|
||||
UPSTREAM_REPO="jub0t/Concat"
|
||||
@@ -47,7 +46,7 @@ latest_version() {
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local tag asset sha
|
||||
local tag manifest relver sha_x86_64 sha_aarch64 arch sha file
|
||||
|
||||
tag="$(latest_tag)"
|
||||
if [[ "$(tag_to_pkgver <<< "$tag")" != "$ver" ]]; then
|
||||
@@ -55,23 +54,31 @@ refresh_checksums() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# e.g. Concat-0.2.1-linux-x86_64.tar.gz - the version is the workspace's,
|
||||
# not the tag's
|
||||
# `|| true`, so that a release that stops carrying the asset says so here
|
||||
# instead of ending the run on grep's exit status with nothing printed.
|
||||
asset="$(gh api "repos/$UPSTREAM_REPO/releases/tags/$tag" --jq '.assets[].name' \
|
||||
| grep -E '^Concat-.*-linux-x86_64\.tar\.gz$' || true)"
|
||||
if [[ -z "$asset" || "$(wc -l <<< "$asset")" -ne 1 ]]; then
|
||||
echo "expected exactly one linux-x86_64 tarball in $tag, got: ${asset:-none}" >&2
|
||||
manifest="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$tag/manifest.json")"
|
||||
relver="$(jq -r '.version // empty' <<< "$manifest" 2>/dev/null)"
|
||||
if [[ -z "$relver" ]]; then
|
||||
echo "$tag carries no usable manifest.json" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/$tag/$asset" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
# Both the name and the checksum come from the manifest, and the name is
|
||||
# checked against what the PKGBUILD builds from _relver: a release that
|
||||
# renames its artifacts says so here instead of 404ing in the test build.
|
||||
for arch in x86_64 aarch64; do
|
||||
sha="$(jq -r --arg a "$arch" '.binaries.linux[$a].deb.sha256 // empty' <<< "$manifest")"
|
||||
file="$(jq -r --arg a "$arch" '.binaries.linux[$a].deb.file // empty' <<< "$manifest")"
|
||||
if [[ ! "$sha" =~ ^[0-9a-f]{64}$ || "$file" != "Concat-$relver-linux-$arch.deb" ]]; then
|
||||
echo "$tag's manifest lists no Concat-$relver-linux-$arch.deb with a sha256" \
|
||||
"(file: ${file:-none})" >&2
|
||||
return 1
|
||||
fi
|
||||
printf -v "sha_$arch" '%s' "$sha"
|
||||
done
|
||||
|
||||
sed -i \
|
||||
-e "s|^_tag=.*|_tag=\"$tag\"|" \
|
||||
-e "s|^_asset=.*|_asset=\"$asset\"|" \
|
||||
-e "s|^sha256sums=.*|sha256sums=('$sha')|" \
|
||||
-e "s|^_relver=.*|_relver=\"$relver\"|" \
|
||||
-e "s|^sha256sums_x86_64=.*|sha256sums_x86_64=('$sha_x86_64')|" \
|
||||
-e "s|^sha256sums_aarch64=.*|sha256sums_aarch64=('$sha_aarch64')|" \
|
||||
"$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user