## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global optflags %{optflags} -Wno-array-bounds %bcond_without test %bcond_without doc %bcond_with bundled %if 0%{?epel} %bcond_without bundled %endif %if %{with bundled} %global gomodulesmode GO111MODULE=on %endif %global goipath kitty Name: kitty Version: 0.31.0 Release: %autorelease 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 # BSD-1-Clause: kitty/uthash.h # MIT: docs/_static/custom.css, shell-integration/ssh/bootstrap-utils.sh # Go dependencies: # github.com/alecthomas/chroma: MIT # github.com/ALTree/bigfloat: MIT # github.com/bmatcuk/doublestar: MIT # github.com/disintegration/imaging: MIT # github.com/dlclark/regexp2: MIT # github.com/google/go-cmp/cmp: BSD-3-Clause # github.com/google/uuid: BSD-3-Clause # github.com/klauspost/cpuid: MIT # github.com/go-ole/go-ole: MIT # github.com/lufia/plan9stats: BSD-3-Clause # github.com/power-devops/perfstat: MIT # github.com/seancfoley/bintree: Apache-2.0 # github.com/seancfoley/ipaddress-go/ipaddr: Apache-2.0 # github.com/shirou/gopsutil: BSD-3-Clause # github.com/shoenig/go-m1cpu: MPL-2.0 # github.com/tklauser/go-sysconf: BSD-3-Clause # github.com/tklauser/numcpus: Apache-2.0 # github.com/zeebo/xxh3: BSD-2-Clause # golang.org/x/exp: BSD-3-Clause # golang.org/x/image: BSD-3-Clause # golang.org/x/sys: BSD-3-Clause # howett.net/plist: BSD-2-Clause AND BSD-3-Clause License: GPL-3.0-only AND LGPL-2.1-or-later AND Zlib AND BSD-1-Clause URL: https://sw.kovidgoyal.net/kitty Source0: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz Source4: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz.sig Source5: https://calibre-ebook.com/signatures/kovid.gpg # git clone https://github.com/kovidgoyal/kitty.git # cd kitty # git checkout v%%{version} # go mod vendor # tar czf kitty-%%{version}-vendor.tar.gz vendor # Source6: kitty-%%{version}-vendor.tar.gz # Add AppData manifest file # * https://github.com/kovidgoyal/kitty/pull/2088 Source1: https://raw.githubusercontent.com/kovidgoyal/kitty/46c0951751444e4f4994008f0d2dcb41e49389f4/kitty/data/%{name}.appdata.xml # Don't build kitten inside setup.py, use gobuild macro in the spec instead to build with fedora flags Patch0: kitty-do-not-build-kitten.patch ## upstream patches # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: golang >= 1.21.0 BuildRequires: go-rpm-macros BuildRequires: gnupg2 BuildRequires: desktop-file-utils BuildRequires: gcc BuildRequires: lcms2-devel BuildRequires: libappstream-glib BuildRequires: ncurses BuildRequires: python3-devel >= 3.8 BuildRequires: wayland-devel 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(xcursor) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcommon-x11) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libcrypto) %if %{with test} # For tests: BuildRequires: /usr/bin/ssh BuildRequires: /usr/bin/getent BuildRequires: /usr/bin/zsh BuildRequires: /usr/bin/rg 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} # Terminfo file has been split from the main program and is required for use # without errors. It has been separated to support SSH into remote machines using # kitty as per the maintainers suggestion. Install the terminfo file on the remote # machine. Requires: %{name}-terminfo = %{version}-%{release} Requires: %{name}-shell-integration = %{version}-%{release} Requires: %{name}-kitten%{?_isa} = %{version}-%{release} # Very weak dependencies, these are required to enable all features of kitty's # "kittens" functions install separately # For the "Hyperlinked grep" feature Recommends: ripgrep Suggests: ImageMagick%{?_isa} %description - Offloads rendering to the GPU for lower system load and buttery smooth scrolling. Uses threaded rendering to minimize input latency. - Supports all modern terminal features: graphics (images), unicode, true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed paste and several new terminal protocol extensions. - Supports tiling multiple terminal windows side by side in different layouts without needing to use an extra program like tmux. - Can be controlled from scripts or the shell prompt, even over SSH. - Has a framework for Kittens, small terminal programs that can be used to extend kitty's functionality. For example, they are used for Unicode input, Hints and Side-by-side diff. - Supports startup sessions which allow you to specify the window/tab layout, working directories and programs to run on startup. - Cross-platform: kitty works on Linux and macOS, but because it uses only OpenGL for rendering, it should be trivial to port to other Unix-like platforms. - Allows you to open the scrollback buffer in a separate window using arbitrary programs of your choice. This is useful for browsing the history comfortably in a pager or editor. - Has multiple copy/paste buffers, like vim. # terminfo package %package terminfo Summary: The terminfo file for Kitty Terminal License: GPL-3.0-only BuildArch: noarch Requires: ncurses-base %description terminfo Cross-platform, fast, feature full, GPU based terminal emulator. The terminfo file for Kitty Terminal. # shell-integration package %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}. # kitten package %package kitten Summary: The kitten executable License: GPL-3.0-only AND MIT AND BSD-3-Clause AND BSD-2-Clause AND Apache-2.0 AND MPL-2.0 AND (BSD-2-Clause AND BSD-3-Clause) %description kitten %{summary}. # doc package %if %{with doc} %package doc Summary: Documentation for %{name} License: GPL-3.0-only AND MIT BuildArch: noarch BuildRequires: python3dist(sphinx) %if ! 0%{?epel} BuildRequires: python3dist(sphinx-copybutton) BuildRequires: python3dist(sphinx-inline-tabs) BuildRequires: python3dist(sphinxext-opengraph) %endif %description doc This package contains the documentation for %{name}. %endif %prep %{gpgverify} --keyring='%{SOURCE5}' --signature='%{SOURCE4}' --data='%{SOURCE0}' %autosetup -p1 %if %{with bundled} %autosetup -NDT -a6 %endif # 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|/usr/bin/kitty|g' \ -i "{}" \; mkdir src ln -s ../ src/kitty %if %{without bundled} %generate_buildrequires export GOPATH=$(pwd):%{gopath} %go_generate_buildrequires %endif %build %set_build_flags %{__python3} setup.py linux-package \ --libdir-name=%{_lib} \ --update-check-interval=0 \ --verbose \ %{nil} %if %{without bundled} export GOPATH=$(pwd):%{gopath} %endif unset LDFLAGS %gobuild -o _build/bin/kitten %{?with_bundled:./tools/cmd}%{!?with_bundled:./src/kitty/tools/cmd} %install # rpmlint fixes find linux-package -type f ! -executable -name "*.py" -exec sed -i '1{\@^#!%{__python3}@d}' "{}" \; find linux-package/%{_lib}/%{name}/shell-integration -type f ! -executable -exec sed -r -i '1{\@^#!/bin/(fish|zsh|sh|bash)@d}' "{}" \; cp -r linux-package %{buildroot}%{_prefix} install -m0755 -Dp _build/bin/kitten %{buildroot}%{_bindir}/kitten install -m0644 -Dp %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.appdata.xml %if %{with doc} # rpmlint fixes rm %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo \ %{buildroot}%{_datadir}/doc/%{name}/html/.nojekyll %endif %check %if %{with test} sed '/def test_ssh_shell_integration/a \ \ self.skipTest("Skipping a flaky test")' -i kitty_tests/ssh.py %if 0%{?epel} sed '/def test_ssh_leading_data/a \ \ self.skipTest("Skipping a failing test")' -i kitty_tests/ssh.py %endif %ifarch ppc64le for test in test_transfer_receive test_transfer_send; do sed "/def $test/a \ \ self.skipTest(\"Skipping a failing test\")" -i kitty_tests/file_transmission.py done %endif export %{gomodulesmode} %if %{without bundled} export GOPATH=$(pwd):%{gopath} %endif # Some tests ignores PATH env... 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 %if %{with doc} %{_mandir}/man{1,5}/*.{1,5}* %endif %{_metainfodir}/*.xml %files kitten %if %{with bundled} # Go bundled provides generator %license vendor/modules.txt %endif %license LICENSE %{_bindir}/kitten %files terminfo %license LICENSE %{_datadir}/terminfo/x/xterm-%{name} %files shell-integration %license LICENSE %{_libdir}/%{name}/shell-integration/ %if %{with doc} %files doc %license LICENSE %doc CONTRIBUTING.md CHANGELOG.rst INSTALL.md %{_docdir}/%{name}/html %dir %{_docdir}/%{name} %endif %changelog * Wed Nov 08 2023 Pavel Solovev - 0.31.0-1 - version 0.31.0 * Thu Oct 05 2023 Pavel Solovev - 0.30.1-1 - version 0.30.1 * Tue Oct 03 2023 Pavel Solovev - 0.30.0-3 - fix overflow when GLFW_IM_MODULE=ibus is set * Mon Oct 02 2023 Pavel Solovev - 0.30.0-2 - split out kitten - clarify licenses for subpackages * Mon Sep 18 2023 Pavel Solovev - 0.30.0-1 - version 0.30.0 * Sun Jul 30 2023 Pavel Solovev - 0.29.2-2 - add conditions to build for epel * Thu Jul 27 2023 Pavel Solovev - 0.29.2-1 - version 0.29.2 * Wed Jul 26 2023 Pavel Solovev - 0.29.1-3 - split out shell integration - fix FTBFS (rhbz#2225956) * Thu Jul 20 2023 Fedora Release Engineering - 0.29.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Jul 17 2023 Pavel Solovev - 0.29.1-1 - version 0.29.1 * Wed Jun 28 2023 Pavel Solovev - 0.28.1-7 - disable flaky test * Tue Jun 27 2023 Python Maint - 0.28.1-6 - Rebuilt for Python 3.12 * Wed Jun 14 2023 Pavel Solovev - 0.28.1-5 - fix build with python3.12 * Wed May 10 2023 Pavel Solovev - 0.28.1-4 - Ask for permission before executing script files * Mon May 08 2023 Pavel Solovev - 0.28.1-3 - enable shell integration by default - remove unneeded weak dep, add ripgrep as a weak dep * Sat Apr 29 2023 Pavel Solovev - 0.28.1-2 - reenable s390x * Tue Apr 25 2023 Pavel Solovev - 0.28.1-1 - version 0.28.1 (rhbz#2188669) * Mon Apr 17 2023 Pavel Solovev - 0.28.0-1 - version 0.28.0 - Migrated license tag to SPDX - Make tests run * Thu Jan 19 2023 Fedora Release Engineering - 0.26.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Nov 07 2022 Yaroslav Sidlovsky - 0.26.5-3 - version 0.26.5 * Mon Nov 07 2022 Yaroslav Sidlovsky - 0.26.5-2 - version 0.26.5 * Mon Nov 07 2022 Yaroslav Sidlovsky - 0.26.5-1 - version 0.26.5 * Mon Oct 17 2022 Artem Polishchuk - 0.26.4-1 - version 0.26.4 * Fri Sep 23 2022 Yaroslav Sidlovsky - 0.26.3-2 - Fixed KITTY_INSTALLATION_DIR in scripts * Thu Sep 22 2022 Yaroslav Sidlovsky - 0.26.3-1 - version 0.26.3 * Mon Sep 05 2022 Yaroslav Sidlovsky - 0.26.2-2 - version 0.26.2 * Mon Sep 05 2022 Yaroslav Sidlovsky - 0.26.2-1 - version 0.26.2 * Tue Aug 30 2022 Yaroslav Sidlovsky - 0.26.1-2 - verifying sources signatures with gnupg2 * Mon Aug 29 2022 Yaroslav Sidlovsky - 0.26.1-1 - version 0.26.1 * Mon Aug 29 2022 Yaroslav Sidlovsky - 0.26.0-1 - version 0.26.0 * Mon Aug 01 2022 Yaroslav Sidlovsky - 0.25.2-7 - ReAdded patch to workaround for Python 3.11 breaking sys._xoptions (RHBZ#2022351) * Mon Aug 01 2022 Yaroslav Sidlovsky - 0.25.2-6 - Patch kitty-0.25.2-workaround-for-python-3.11-breaking-sys._xoptions.patch removed, issue should be fixed in python-3.11-rc1 * Mon Aug 01 2022 Yaroslav Sidlovsky - 0.25.2-5 - Added patch to workaround for Python 3.11 breaking sys._xoptions * Thu Jul 21 2022 Fedora Release Engineering - 0.25.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 04 2022 Yaroslav Sidlovsky - 0.25.2-3 - Fixed build for EPEL9 * Mon Jun 13 2022 Python Maint - 0.25.2-2 - Rebuilt for Python 3.11 * Tue Jun 07 2022 Yaroslav Sidlovsky - 0.25.2-1 - version 0.25.2 * Thu May 26 2022 Yaroslav Sidlovsky - 0.25.1-1 - version 0.25.1 * Sun May 22 2022 Yaroslav Sidlovsky - 0.25.0-4 - Change shebang instead of using __brp_mangle_shebangs_exclude_from * Sun May 22 2022 Yaroslav Sidlovsky - 0.25.0-3 - Prevent brp-mangle-shebangs rpm script from breaking shebang in askpass.py * Sat May 21 2022 Yaroslav Sidlovsky - 0.25.0-2 - Remain script `askpass.py` executable - Fixes rhbz#2088828 * Wed Apr 27 2022 Yaroslav Sidlovsky - 0.25.0-1 - version 0.25.0 * Fri Mar 11 2022 Artem Polishchuk - 0.24.4-2 - build: Split shell integrations into sub-packages | rh#2063040 | co-authored with Jamie Nguyen jamielinux@fedoraproject.org * Thu Mar 03 2022 Artem Polishchuk - 0.24.4-1 - chore(update): 0.24.4 * Tue Mar 01 2022 Yaroslav Sidlovsky - 0.24.3-1 - version 0.24.3 * Thu Feb 10 2022 Yaroslav Sidlovsky - 0.24.2-8 - Enable "_package_note_file" hack for Fedora >= 36 * Thu Feb 10 2022 Yaroslav Sidlovsky - 0.24.2-7 - Enable kitty shell integration only if env KITTY_PID is defined * Tue Feb 08 2022 Yaroslav Sidlovsky - 0.24.2-6 - Disable shell integration by default * Tue Feb 08 2022 Yaroslav Sidlovsky - 0.24.2-5 - Zsh integration can break zsh startup, disabled for now * Mon Feb 07 2022 Yaroslav Sidlovsky - 0.24.2-4 - kitty.sh, kitty.fish - replace hardcoded path with %%{_libdir}/%%{name} * Mon Feb 07 2022 Yaroslav Sidlovsky - 0.24.2-3 - Use --shell-integration param instead of modification of setup.py * Mon Feb 07 2022 Yaroslav Sidlovsky - 0.24.2-2 - Disable user shell configuration files modification (RHBZ#2051454) * Sat Feb 05 2022 Yaroslav Sidlovsky - 0.24.2-1 - build(update): 0.24.2 * Wed Feb 02 2022 Artem Polishchuk - 0.24.1-1 - chore(update): 0.24.1 | feat @zawertun * Thu Jan 20 2022 Fedora Release Engineering - 0.21.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.21.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 29 2021 Artem Polishchuk - 0.21.2-1 - build(update): 0.21.2 * Mon Jun 14 2021 Miro Hrončok - 0.21.1-2 - Run tests in %%check with currently-built kitty - Fixes rhbz#1971563 * Mon Jun 14 2021 Artem Polishchuk - 0.21.1-1 - build(update): 0.21.1 * Sat Jun 12 2021 Artem Polishchuk - 0.21.0-1 - build(update): 0.21.0 * Fri Jun 04 2021 Python Maint - 0.20.3-2 - Rebuilt for Python 3.10 * Thu May 06 2021 Artem Polishchuk - 0.20.3-1 - build(update): 0.20.3 * Wed Apr 28 2021 Artem Polishchuk - 0.20.2-1 - build(update): 0.20.2 * Mon Apr 19 2021 Artem Polishchuk - 0.20.1-1 - build(update): 0.20.1 * Mon Apr 19 2021 Artem Polishchuk - 0.20.0-1 - build(update): 0.20.0 * Tue Jan 26 2021 Fedora Release Engineering - 0.19.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Dec 19 2020 Artem Polishchuk - 0.19.3-1 - build(update): 0.19.3 * Fri Nov 13 2020 Artem Polishchuk - 0.19.2-1 - build(update): 0.19.2 * Tue Oct 6 16:34:51 EEST 2020 Artem Polishchuk - 0.19.1-1 - build(update): 0.19.1 * Sun Oct 4 2020 Artem Polishchuk - 0.19.0-1 - Update to 0.19.0 - build: add BR: lcms2-devel * Fri Aug 28 2020 Elliott Sales de Andrade - 0.18.3-3 - Enable building on s390x * Mon Aug 24 2020 Michel Alexandre Salim - 0.18.3-2 - Support building on EPEL8 * Tue Aug 11 2020 Artem Polishchuk - 0.18.3-1 - Update to 0.18.3 * Tue Jul 28 2020 Artem Polishchuk - 0.18.2-1 - Update to 0.18.2 * Tue Jul 28 2020 Fedora Release Engineering - 0.18.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jul 24 2020 Artem Polishchuk - 0.18.1-2 - Add 'ncurses' BR explicitly to fix FTBFS for F33 * Tue Jun 23 2020 Artem Polishchuk - 0.18.1-1 - Update to 0.18.1 * Sat Jun 20 2020 Artem Polishchuk - 0.18.0-1 - Update to 0.18.0 - Disable LTO * Tue May 26 2020 Miro Hrončok - 0.17.4-2 - Rebuilt for Python 3.9 * Sat May 09 2020 Artem Polishchuk - 0.17.4-1 - Update to 0.17.4 * Thu Apr 23 2020 Artem Polishchuk - 0.17.3-1 - Update to 0.17.3 * Sun Mar 29 2020 Artem Polishchuk - 0.17.2-1 - Update to 0.17.2 * Tue Mar 24 2020 Artem Polishchuk - 0.17.1-2 - Drop sedding build flags. Not needed anymore. - Fix build step as upstream recommended - Do not exclude ppc64le arch anymore * Tue Mar 24 2020 Artem Polishchuk - 0.17.1-1 - Update to 0.17.1 * Tue Mar 24 2020 Artem Polishchuk - 0.17.0-1 - Update to 0.17.0 - Exclude arch ppc64le * Mon Mar 09 2020 Artem Polishchuk - 0.16.0-3 - Fix AppData description - #1811657 * Thu Mar 05 2020 Than Ngo - 0.16.0-2 - Fixed #1792789 - kitty fails to build * Tue Jan 28 2020 Artem Polishchuk - 0.16.0-1 - Update to 0.16.0 * Thu Jan 02 2020 Artem Polishchuk - 0.15.1-1 - Update to 0.15.1 * Wed Nov 27 2019 Artem Polishchuk - 0.15.0-1 - Update to 0.15.0 * Sun Oct 20 2019 Artem Polishchuk - 0.14.6-12 - Update to 0.14.6 - Spec file fixes - Thanks to Vitaly Zaitsev * Fri Jul 12 2019 eskse 0.14.2-1 - Initial version of file