Files
FWS-Kitty/packaging/PKGBUILD
T
BlackAngelTV 7b64da8a38
CI / check (push) Failing after 5s
Release / check (push) Failing after 4s
Release / release (push) Skipped
ci(release): publish the Arch package when the version changes
Releases were built and uploaded by hand, so the published package could
lag behind main and nothing checked the tree before it shipped. The new
version file drives a pipeline that lints, builds and tests the exact
commit, then creates the Gitea release and pushes the package to the
pacman repository.
2026-11-25 10:14:56 +01:00

84 lines
3.5 KiB
Bash

# Maintainer: FWS <maintainers@nocode-var.tech>
#
# Arch package for the FWS kitty fork. Built with makepkg from this directory:
#
# cd packaging && makepkg -f
#
# The resulting fws-kitty-<version>-<rel>-<arch>.pkg.tar.zst is ready to be
# added to a pacman repository (see README.md in this directory).
#
# kitty installs its own binary under /usr/bin and cannot coexist with the
# upstream package, hence provides/conflicts.
pkgname=fws-kitty
pkgver=0.50.0
pkgrel=3
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
arch=('x86_64' 'aarch64')
url='https://gitea.nocode-var.tech/FWS/FWS-Kitty'
license=('GPL-3.0-only')
# Replace main with the tag or commit to ship once the release is cut.
_branch=main
_repo='https://gitea.nocode-var.tech/FWS/FWS-Kitty.git'
# The CI sets FWS_SOURCE_REF=commit=<sha> so the package is built from the exact
# commit being released instead of whatever main points at by the time makepkg
# clones. A local build keeps following _branch.
_source_ref=${FWS_SOURCE_REF:-branch=$_branch}
depends=(
python harfbuzz zlib libpng lcms2 xxhash openssl
pixman cairo freetype2 fontconfig
libx11 libxcb libxrandr libxinerama libxcursor libxi libxrender
libxkbcommon libxkbcommon-x11 mesa wayland dbus
libcanberra systemd-libs
# Arch ships these files in separate packages; shipping them here would
# make pacman abort on file conflicts with the installed split packages.
kitty-shell-integration kitty-terminfo
)
makedepends=(
git go python pkgconf ncurses rsync which file simde shader-slang
)
optdepends=(
'imagemagick: display uncommon image formats'
'shader-slang: custom shaders'
)
provides=('kitty')
conflicts=('kitty')
source=(
"$pkgname::git+$_repo#$_source_ref"
"nerdfonts-symbols.tar.xz::https://github.com/ryanoasis/nerd-fonts/releases/download/v3.5.1/NerdFontsSymbolsOnly.tar.xz"
)
sha256sums=('SKIP' '01172f37db8543edb102e5cb5c64101c9f4686630804d49b419aa07b23a69996')
prepare() {
# kitty embeds the mono variant of the Nerd font at build time, but Arch
# only packages the proportional one, so ship the font with the build.
mkdir -p "$pkgname/fonts"
cp "$srcdir/SymbolsNerdFontMono-Regular.ttf" "$pkgname/fonts/"
cd "$pkgname"
# linux-package regenerates the man pages and the HTML docs, and some of
# their dependencies (furo, sphinx-design) are not packaged for Arch, so
# keep a local throwaway environment instead of requiring the system ones.
# Do not reuse the system packages: pip would then skip installing sphinx
# itself and the venv would have no sphinx-build entry point.
python -m venv .docs-venv
.docs-venv/bin/pip install --disable-pip-version-check -q -r docs/requirements.txt
}
package() {
cd "$pkgname"
# kitty's linux-package target stages a full self-contained install, so
# pointing --prefix at the package root is enough; no manual file copying.
PATH="$srcdir/$pkgname/.docs-venv/bin:$PATH" python setup.py linux-package --prefix "$pkgdir/usr"
# These paths are owned by kitty-shell-integration and kitty-terminfo on
# Arch. Remove them here so upgrading from upstream kitty does not fail
# with pacman file conflicts; the dependencies above provide them.
rm -rf "$pkgdir/usr/lib/kitty/shell-integration"
rm -f "$pkgdir/usr/share/terminfo/x/xterm-kitty"
rmdir --ignore-fail-on-non-empty "$pkgdir/usr/share/terminfo/x" "$pkgdir/usr/share/terminfo" 2>/dev/null || true
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}