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,26 @@
|
||||
pkgbase = schist
|
||||
pkgdesc = Layered image editor with PSD and Affinity support
|
||||
pkgver = 0.15.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/Infrawrench/schist
|
||||
arch = x86_64
|
||||
arch = aarch64
|
||||
license = MIT
|
||||
makedepends = cargo
|
||||
makedepends = clang
|
||||
makedepends = mold
|
||||
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
|
||||
options = !lto
|
||||
source = schist-0.15.0.tar.gz::https://github.com/Infrawrench/schist/archive/v0.15.0.tar.gz
|
||||
sha256sums = ff11e4d29c47d6a8fe8736cb7efa6293894211b4f96cf9fca5bca9a0e7bb2585
|
||||
|
||||
pkgname = schist
|
||||
@@ -0,0 +1,55 @@
|
||||
# Maintainer: Felitendo
|
||||
# Contributor: Infrawrench LLC <astrid@infrawrench.com>
|
||||
# This PKGBUILD is updated automatically:
|
||||
# https://github.com/Felitendo/PKGBUILDS
|
||||
|
||||
pkgname=schist
|
||||
pkgver=0.15.0
|
||||
pkgrel=1
|
||||
pkgdesc="Layered image editor with PSD and Affinity support"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/Infrawrench/schist"
|
||||
license=('MIT')
|
||||
# Upstream's own list (packaging/linux/aur/schist), checked by pkg.sh on every
|
||||
# new version. fontconfig, wayland and the Vulkan loader are dlopen'd.
|
||||
# vulkan-driver: the loader alone draws nothing.
|
||||
depends=('fontconfig' 'freetype2' 'hicolor-icon-theme' 'libxcb' 'libxkbcommon'
|
||||
'libxkbcommon-x11' 'vulkan-driver' 'vulkan-icd-loader' 'wayland')
|
||||
# dlopen'd, the app starts without it
|
||||
optdepends=('libheif>=1.23.4: HEIC import')
|
||||
# clang + mold: upstream's .cargo/config.toml links with them on x86_64
|
||||
makedepends=('cargo' 'clang' 'mold')
|
||||
# !lto: makepkg's -flto=auto turns ring's C objects into GCC bitcode that the
|
||||
# clang link cannot read
|
||||
options=('!lto')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('ff11e4d29c47d6a8fe8736cb7efa6293894211b4f96cf9fca5bca9a0e7bb2585')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/^host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release -p schist-app
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
install -Dm755 target/release/schist "$pkgdir/usr/bin/schist"
|
||||
install -Dm644 packaging/linux/schist.desktop \
|
||||
"$pkgdir/usr/share/applications/schist.desktop"
|
||||
# named after the desktop entry's Icon= key
|
||||
install -Dm644 packaging/linux/schist.png \
|
||||
"$pkgdir/usr/share/icons/hicolor/256x256/apps/com.infrawrench.schist.png"
|
||||
install -Dm644 packaging/linux/com.infrawrench.schist.mime.xml \
|
||||
"$pkgdir/usr/share/mime/packages/com.infrawrench.schist.xml"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
# schist - Schist (https://github.com/Infrawrench/schist), a layered image
|
||||
# editor in Rust (gpui) with PSD and Affinity support.
|
||||
#
|
||||
# Source package: the PKGBUILD builds the release tag, following upstream's own
|
||||
# PKGBUILD in packaging/linux/aur/schist. That file names the dependencies of
|
||||
# each tag, so refresh_checksums() fails when they no longer match ours.
|
||||
#
|
||||
# Releases are tagged v<version>, and /releases/latest skips prereleases.
|
||||
|
||||
UPSTREAM_REPO="Infrawrench/schist"
|
||||
|
||||
# Installed in CI (pacman) before the makepkg test build: the makedepends plus
|
||||
# the libraries the build links against.
|
||||
BUILD_DEPS=(rust clang mold fontconfig freetype2 libxcb libxkbcommon
|
||||
libxkbcommon-x11 vulkan-icd-loader wayland)
|
||||
|
||||
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 name sha
|
||||
|
||||
upstream="$(gh api "repos/$UPSTREAM_REPO/contents/packaging/linux/aur/schist/PKGBUILD?ref=v$ver" \
|
||||
-H 'Accept: application/vnd.github.raw')" || return 1
|
||||
for name in depends makedepends; do
|
||||
if [[ "$(pkgbuild_array "$name" <<< "$upstream")" != "$(pkgbuild_array "$name" < "$pkgbuild")" ]]; then
|
||||
echo "upstream's $name changed in v$ver, update the PKGBUILD (and BUILD_DEPS):" >&2
|
||||
pkgbuild_array "$name" <<< "$upstream" >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/archive/v$ver.tar.gz" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
if [[ "$sha" == "$(printf '' | sha256sum | cut -d' ' -f1)" ]]; then
|
||||
echo "could not download the v$ver source tarball" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
sed -i "s|^sha256sums=.*|sha256sums=('$sha')|" "$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user