# kitty.spec — kitty terminal, newer than Fedora's (0.47.1 on F44, 0.48.2 on F45). # # Based on Fedora's kitty.spec (src.fedoraproject.org/rpms/kitty), moved to # 0.50.0 for its Wayland crash fixes. Differences from Fedora: # - The Go module vendor tarball is generated in the networked SRPM step # (`go mod vendor` against the pinned tarball's go.sum), like the Rust # vendor tarballs; see .copr/srpm.sh. # - kitty 0.50 compiles its built-in shaders with the Slang compiler, which # Fedora does not package. The checksum-pinned official slangc release is # used only as a build tool (as herdr does with Zig) and is not shipped. # Custom shaders at runtime still need a slangc in PATH. # - Fedora's Python 3.15 and coreutils test patches are upstream in 0.50.0. # # Our COPR has a higher repo priority than Fedora, so this package wins over # Fedora's kitty even after Fedora ships a newer one: bump it when Fedora # catches up, or drop it. %global gomodulesmode GO111MODULE=on %global goipath kitty %global slang_version 2026.14.1 # Outside the source tree, so the vendor license scan skips the build tool. %global slang_dir %{_builddir}/slang-%{slang_version} %bcond test 1 Name: kitty Version: 0.50.0 Release: 1%{?dist} Summary: Cross-platform, fast, feature full, GPU based terminal emulator # GPL-3.0-only: kitty # Zlib: glfw # LGPL-2.1-or-later: kitty/iqsort.h # MIT: docs/_static/custom.css, shell-integration/ssh/bootstrap-utils.sh # MIT AND CC0-1.0: simde # CC0-1.0: 3rdparty/ringbuf # BSD-2-Clause: 3rdparty/base64 # MIT: NerdFontsSymbolsOnly # MIT: 3rdparty/verstable.h License: GPL-3.0-only AND LGPL-2.1-or-later AND Zlib AND (MIT AND CC0-1.0) AND BSD-2-Clause AND CC0-1.0 AND MIT URL: https://sw.kovidgoyal.net/kitty Source0: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz.sig Source2: https://calibre-ebook.com/signatures/kovid.gpg # Generated by .copr/srpm.sh (go mod vendor); unpacks to vendor/. Source3: %{name}-%{version}-go-vendor.tar.zst # Fedora's go-vendor-tools license overrides for the vendored modules. Source4: kitty-go-vendor-tools.toml # AppData manifest, https://github.com/kovidgoyal/kitty/pull/2088 Source5: https://raw.githubusercontent.com/kovidgoyal/kitty/46c0951751444e4f4994008f0d2dcb41e49389f4/kitty/data/%{name}.appdata.xml Source6: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/NerdFontsSymbolsOnly.tar.xz # Build-only shader compiler, the version kitty's own CI uses (bypy/sources.json). Source7: https://github.com/shader-slang/slang/releases/download/v%{slang_version}/slang-%{slang_version}-linux-x86_64-glibc-2.28.tar.gz # Don't fail the test suite on DeprecationWarnings (Fedora downstream-only) Patch0: kitty-do-not-treat-DeprecationWarnings-as-errors-in-tests.patch # Python 3.15 (F45) no longer counts getrefcount()'s argument (downstream) Patch1: kitty-test-refcount-python-3.15.patch # The prebuilt slangc is x86_64-only. ExclusiveArch: x86_64 BuildRequires: golang >= 1.26.0 BuildRequires: go-rpm-macros BuildRequires: go-vendor-tools BuildRequires: gnupg2 BuildRequires: desktop-file-utils BuildRequires: gcc BuildRequires: lcms2-devel BuildRequires: libappstream-glib # slangc links libstdc++. BuildRequires: libstdc++ BuildRequires: ncurses BuildRequires: python3-devel >= 3.12 BuildRequires: wayland-devel BuildRequires: simde-static BuildRequires: pkgconfig(cairo-fc) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(harfbuzz) >= 2.2 BuildRequires: pkgconfig(libcanberra) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxxhash) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcommon-x11) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libcrypto) %if %{with test} BuildRequires: fish BuildRequires: glibc-common BuildRequires: openssh-clients BuildRequires: ripgrep BuildRequires: zsh BuildRequires: python3dist(pillow) %endif Requires: python3%{?_isa} Requires: hicolor-icon-theme Obsoletes: %{name}-bash-integration < 0.28.1-3 Obsoletes: %{name}-fish-integration < 0.28.1-3 Provides: %{name}-bash-integration = %{version}-%{release} Provides: %{name}-fish-integration = %{version}-%{release} # The terminfo file is split out so it can be installed on SSH hosts. Requires: %{name}-terminfo = %{version}-%{release} Requires: %{name}-shell-integration = %{version}-%{release} Requires: %{name}-kitten%{?_isa} = %{version}-%{release} # For the "Hyperlinked grep" feature Recommends: ripgrep Suggests: ImageMagick%{?_isa} Provides: bundled(font(SymbolsNerdFontMono)) = 3.4.0 Provides: bundled(font(SymbolsNerdFont)) = 3.4.0 Provides: bundled(Verstable) = 2.1.1 # modified version of https://github.com/dhess/c-ringbuf Provides: bundled(c-ringbuf) # heavily modified Provides: bundled(glfw) # https://github.com/aklomp/base64 Provides: bundled(base64simd) %description kitty is a fast, feature-rich, GPU based terminal emulator. It supports graphics, unicode, true-color, OpenType ligatures, the mouse protocol, focus tracking and bracketed paste; tiles multiple terminal windows without tmux; can be controlled from scripts or the shell, even over SSH; and is extended by "kittens", small terminal programs such as Unicode input, hints and a side-by-side diff. %package terminfo Summary: The terminfo file for Kitty Terminal License: GPL-3.0-only BuildArch: noarch Requires: ncurses-base %description terminfo The terminfo file for Kitty Terminal. %package shell-integration Summary: Shell integration scripts for %{name} License: GPL-3.0-only AND MIT BuildArch: noarch Recommends: %{name}-kitten %description shell-integration %{summary}. %package kitten Summary: The kitten executable # Checked by %%go_vendor_license_check below. %global kitten_license Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-only AND MIT AND OFL-1.1 License: %{kitten_license} %description kitten %{summary}. %package doc Summary: Documentation for %{name} License: GPL-3.0-only AND MIT BuildArch: noarch BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-copybutton) BuildRequires: python3dist(sphinx-design) BuildRequires: python3dist(sphinxext-opengraph) %description doc This package contains the documentation for %{name}. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 -a3 mkdir fonts tar -xf %{SOURCE6} -C fonts mkdir -p %{slang_dir} tar -xzf %{SOURCE7} -C %{slang_dir} # Changing sphinx theme to classic sed "s/html_theme = 'furo'/html_theme = 'classic'/" -i docs/conf.py # Replace python shebangs to make them compatible with fedora find -type f -name "*.py" -exec sed -e 's|/usr/bin/env python3|%{python3}|g' \ -e 's|/usr/bin/env python|%{python3}|g' \ -e 's|/usr/bin/env -S kitty|%{_bindir}/kitty|g' \ -i "{}" \; find -type f ! -executable -name "*.py" -exec sed -i '1{\@^#!%{python3}@d}' "{}" \; %generate_buildrequires %go_vendor_license_buildrequires -c %{S:4} %build %set_build_flags export SLANGC=%{slang_dir}/bin/slangc %{python3} setup.py linux-package \ --libdir-name=%{_lib} \ --update-check-interval=0 \ --verbose \ --skip-building-kitten \ --ignore-compiler-warnings \ %{nil} unset LDFLAGS %gobuild -o _build/bin/kitten ./tools/cmd %install %go_vendor_license_install -c %{S:4} # rpmlint fixes find linux-package/%{_lib}/%{name}/shell-integration -type f ! -executable -exec sed -r -i '1{\@^#!/bin/(fish|zsh|sh|bash)@d}' "{}" \; cp -a linux-package/. %{buildroot}%{_prefix} install -m0755 -Dp _build/bin/kitten %{buildroot}%{_bindir}/kitten install -m0644 -Dp %{SOURCE5} %{buildroot}%{_metainfodir}/%{name}.appdata.xml rm -f %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo \ %{buildroot}%{_datadir}/doc/%{name}/html/.nojekyll %check %go_vendor_license_check -c %{S:4} %{kitten_license} # The build-only Slang compiler must not leak into the payload. if find %{buildroot} \( -name 'slangc' -o -name 'libslang*' \) | grep -q .; then echo "slang build tool leaked into the payload" >&2 exit 1 fi # The built-in shaders were compiled. find %{buildroot}%{_libdir}/%{name} -path '*shaders*' -type f | grep -q . %if %{with test} export %{gomodulesmode} export SLANGC=%{slang_dir}/bin/slangc # Some tests ignore PATH... mkdir -p kitty/launcher ln -s %{buildroot}%{_bindir}/%{name} kitty/launcher/ export PATH=%{buildroot}%{_bindir}:$PATH export PYTHONPATH=$(pwd) %{python3} setup.py test \ --prefix=%{buildroot}%{_prefix} %endif appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %files %license LICENSE %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/*/*.{png,svg} %{_libdir}/%{name}/ %exclude %{_libdir}/%{name}/shell-integration %{_mandir}/man{1,5}/*.{1,5}* %{_metainfodir}/*.xml %files kitten -f %{go_vendor_license_filelist} %license vendor/modules.txt %license LICENSE %{_bindir}/kitten %files terminfo %license LICENSE %{_datadir}/terminfo/x/xterm-%{name} %files shell-integration %license LICENSE %{_libdir}/%{name}/shell-integration/ %files doc %license LICENSE %doc CONTRIBUTING.md CHANGELOG.rst INSTALL.md %{_docdir}/%{name}/html/ %dir %{_docdir}/%{name} %changelog * Tue Nov 03 2026 Andrew Gaspar - 0.50.0-1 - Package kitty 0.50.0 for Omedora's COPR, from Fedora's 0.48.2 spec - Generate the Go vendor tarball in the SRPM step; compile the built-in shaders with a build-only Slang 2026.14.1 compiler - Drop Fedora's Python 3.15 and coreutils test patches (upstream in 0.50.0); rebase the DeprecationWarnings test patch - Make the fallback-font reference test independent of the Python version (it assumed getrefcount() counts its argument, which Python 3.15 does not)