Files
FWS-Kitty/packaging/PKGBUILD
T
BlackAngelTV dc13716431 fix(packaging): avoid conflicts with kitty split packages
fws-kitty shipped the shell integration and system terminfo files also owned by kitty-shell-integration and kitty-terminfo, so pacman aborted on file conflicts. Depend on those packages and omit their paths from fws-kitty; bump pkgrel to publish the fix.
2026-11-12 13:52:17 +01:00

80 lines
3.3 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=2
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'
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#branch=$_branch"
"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"
}