schist, schist-bin: new package
This commit is contained in:
1 parent
c81f77d539
commit
c6e2d9edfb
7 files changed
+259
No files matched your search
@@ -0,0 +1,28 @@
|
||||
pkgbase = schist-bin
|
||||
pkgdesc = Layered image editor with PSD and Affinity support (upstream binary)
|
||||
pkgver = 0.15.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/Infrawrench/schist
|
||||
arch = x86_64
|
||||
arch = aarch64
|
||||
license = MIT
|
||||
depends = fontconfig
|
||||
depends = freetype2
|
||||
depends = hicolor-icon-theme
|
||||
depends = libxcb
|
||||
depends = libxkbcommon
|
||||
depends = libxkbcommon-x11
|
||||
depends = vulkan-driver
|
||||
depends = vulkan-icd-loader
|
||||
depends = wayland
|
||||
optdepends = libheif>=1.23.4: HEIC import
|
||||
provides = schist=0.15.0
|
||||
conflicts = schist
|
||||
options = !strip
|
||||
options = !debug
|
||||
source_x86_64 = https://github.com/Infrawrench/schist/releases/download/v0.15.0/schist-0.15.0-1-x86_64.pkg.tar.zst
|
||||
sha256sums_x86_64 = ef4501ecc8109e21d1813fdfc8d618090a9be5bb238545527614a1ff60d983c1
|
||||
source_aarch64 = https://github.com/Infrawrench/schist/releases/download/v0.15.0/schist-0.15.0-1-aarch64.pkg.tar.zst
|
||||
sha256sums_aarch64 = 11e12bd6bc0ee6fb6d27004809750c62a180d64c5eb274a2aac685fdabdeeff1
|
||||
|
||||
pkgname = schist-bin
|
||||
@@ -0,0 +1,37 @@
|
||||
# Maintainer: Felitendo
|
||||
# Contributor: Infrawrench LLC <astrid@infrawrench.com>
|
||||
# This PKGBUILD is updated automatically:
|
||||
# https://github.com/Felitendo/PKGBUILDS
|
||||
|
||||
pkgname=schist-bin
|
||||
pkgver=0.15.0
|
||||
pkgrel=1
|
||||
# Upstream's own package release in the asset name, synced by pkg.sh. It only
|
||||
# moves when upstream repackages a version that has already shipped.
|
||||
_relver=1
|
||||
pkgdesc="Layered image editor with PSD and Affinity support (upstream binary)"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/Infrawrench/schist"
|
||||
license=('MIT')
|
||||
# The same list as the source package, checked by pkg.sh against upstream's
|
||||
# PKGBUILD. Upstream's own schist-bin makes vulkan-driver optional only to
|
||||
# keep its build container from pulling in nvidia-utils.
|
||||
depends=('fontconfig' 'freetype2' 'hicolor-icon-theme' 'libxcb' 'libxkbcommon'
|
||||
'libxkbcommon-x11' 'vulkan-driver' 'vulkan-icd-loader' 'wayland')
|
||||
optdepends=('libheif>=1.23.4: HEIC import')
|
||||
provides=("schist=${pkgver}")
|
||||
conflicts=('schist')
|
||||
# upstream strips the debug info itself and keeps the build id for its crash
|
||||
# reports
|
||||
options=('!strip' '!debug')
|
||||
# The release asset is a pacman package built by upstream's CI
|
||||
# (packaging/linux/packages.sh). makepkg extracts it, only its usr/ is taken.
|
||||
source_x86_64=("${url}/releases/download/v${pkgver}/schist-${pkgver}-${_relver}-x86_64.pkg.tar.zst")
|
||||
source_aarch64=("${url}/releases/download/v${pkgver}/schist-${pkgver}-${_relver}-aarch64.pkg.tar.zst")
|
||||
sha256sums_x86_64=('ef4501ecc8109e21d1813fdfc8d618090a9be5bb238545527614a1ff60d983c1')
|
||||
sha256sums_aarch64=('11e12bd6bc0ee6fb6d27004809750c62a180d64c5eb274a2aac685fdabdeeff1')
|
||||
|
||||
package() {
|
||||
cp -a "$srcdir/usr" "$pkgdir/"
|
||||
mv "$pkgdir/usr/share/licenses/schist" "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
# schist-bin - Schist (https://github.com/Infrawrench/schist), a layered image
|
||||
# editor in Rust (gpui) with PSD and Affinity support.
|
||||
#
|
||||
# Upstream builds the Linux release itself and publishes a .pkg.tar.zst per
|
||||
# architecture, which the PKGBUILD repackages, as upstream's own
|
||||
# packaging/linux/aur/schist-bin does. GitHub lists each asset's sha256, so a
|
||||
# new version needs no download.
|
||||
#
|
||||
# The asset name carries upstream's package release
|
||||
# (schist-<version>-<release>-<arch>.pkg.tar.zst), which is synced into
|
||||
# _relver. The binary needs the same libraries as the source package, so the
|
||||
# dependencies are checked against upstream's source PKGBUILD of the same tag:
|
||||
# a missing one would not break the test build, only the app.
|
||||
|
||||
UPSTREAM_REPO="Infrawrench/schist"
|
||||
|
||||
latest_version() {
|
||||
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# pkgbuild_array <name>: the words of one array in a PKGBUILD on stdin, sorted
|
||||
pkgbuild_array() {
|
||||
awk -v n="$1" '$0 ~ "^" n "=\\(" { f = 1 } f { sub(/#.*/, ""); print } f && /\)/ { exit }' \
|
||||
| sed "s/^$1=(//; s/).*//" | tr -s " '\"" '\n' | sed '/^$/d' | sort
|
||||
}
|
||||
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local upstream assets relver arch sha sha_x86_64 sha_aarch64
|
||||
|
||||
upstream="$(gh api "repos/$UPSTREAM_REPO/contents/packaging/linux/aur/schist/PKGBUILD?ref=v$ver" \
|
||||
-H 'Accept: application/vnd.github.raw')" || return 1
|
||||
if [[ "$(pkgbuild_array depends <<< "$upstream")" != "$(pkgbuild_array depends < "$pkgbuild")" ]]; then
|
||||
echo "upstream's depends changed in v$ver, update the PKGBUILD:" >&2
|
||||
pkgbuild_array depends <<< "$upstream" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# "<name> sha256:<hex>" per pacman package of the release
|
||||
assets="$(gh api "repos/$UPSTREAM_REPO/releases/tags/v$ver" \
|
||||
--jq '.assets[] | select(.name | endswith(".pkg.tar.zst")) | "\(.name) \(.digest)"')"
|
||||
relver="$(sed -n "s/^schist-$ver-\([0-9]*\)-x86_64\.pkg\.tar\.zst .*/\1/p" <<< "$assets" \
|
||||
| sort -n | tail -n1)"
|
||||
|
||||
for arch in x86_64 aarch64; do
|
||||
sha="$(awk -v f="schist-$ver-$relver-$arch.pkg.tar.zst" \
|
||||
'$1 == f { sub(/^sha256:/, "", $2); print $2 }' <<< "$assets")"
|
||||
if [[ ! "$sha" =~ ^[0-9a-f]{64}$ ]]; then
|
||||
echo "v$ver has no schist-$ver-$relver-$arch.pkg.tar.zst with a sha256" >&2
|
||||
return 1
|
||||
fi
|
||||
printf -v "sha_$arch" '%s' "$sha"
|
||||
done
|
||||
|
||||
sed -i \
|
||||
-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