## 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 %global commit0 e2b5c6688dfe8cfe3b43f05ba7451c22ca382a76 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #global bumpver 0 %global gomodulesmode GO111MODULE=on %bcond_without test %bcond_without doc Name: kitty Version: 0.29.1%{?bumpver:^%{bumpver}.git%{shortcommit0}} 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 License: GPL-3.0-only AND LGPL-2.1-or-later AND Zlib AND BSD-1-Clause AND MIT URL: https://sw.kovidgoyal.net/kitty %if 0%{?bumpver} Source0: https://github.com/kovidgoyal/kitty/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz %else 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 %endif # 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.20.0 BuildRequires: git-core BuildRequires: gnupg2 BuildRequires: desktop-file-utils BuildRequires: gcc %if 0%{?el8} BuildRequires: go-srpm-macros BuildRequires: python38-devel %else BuildRequires: go-rpm-macros BuildRequires: python3-devel %endif BuildRequires: lcms2-devel BuildRequires: libappstream-glib BuildRequires: librsync-devel BuildRequires: ncurses BuildRequires: wayland-devel BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libcanberra) BuildRequires: pkgconfig(libpng) 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) # BuildRequires: golang(github.com/alecthomas/chroma/v2) # BuildRequires: golang(github.com/alecthomas/chroma/v2/lexers) # BuildRequires: golang(github.com/alecthomas/chroma/v2/styles) # BuildRequires: golang(github.com/ALTree/bigfloat) # BuildRequires: golang(github.com/bmatcuk/doublestar/v4) # BuildRequires: golang(github.com/disintegration/imaging) # BuildRequires: golang(github.com/dlclark/regexp2) # BuildRequires: golang(github.com/google/go-cmp/cmp) # BuildRequires: golang(github.com/google/uuid) # BuildRequires: golang(github.com/jamesruan/go-rfc1924/base85) # BuildRequires: golang(github.com/seancfoley/ipaddress-go/ipaddr) # BuildRequires: golang(github.com/shirou/gopsutil/v3/process) # BuildRequires: golang(golang.org/x/exp/constraints) # BuildRequires: golang(golang.org/x/exp/maps) # BuildRequires: golang(golang.org/x/exp/rand) # BuildRequires: golang(golang.org/x/exp/slices) # BuildRequires: golang(golang.org/x/image/bmp) # BuildRequires: golang(golang.org/x/image/tiff) # BuildRequires: golang(golang.org/x/image/webp) # BuildRequires: golang(golang.org/x/sys/unix) # BuildRequires: golang(howett.net/plist) %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 %if 0%{?el8} Requires: python38%{?_isa} %else Requires: python3%{?_isa} %endif 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} # 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 BuildArch: noarch Requires: ncurses-base %description terminfo Cross-platform, fast, feature full, GPU based terminal emulator. The terminfo file for Kitty Terminal. # doc package %if %{with doc} %package doc Summary: Documentation for %{name} 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 %if 0%{?bumpver} %else %{gpgverify} --keyring='%{SOURCE5}' --signature='%{SOURCE4}' --data='%{SOURCE0}' %endif %autosetup -p1 %{?bumpver:-n %{name}-%{commit0}} go mod vendor # 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 -p src/kitty ln -s ../../tools src/kitty/tools ln -s ../../kittens src/kitty/kittens %build %set_build_flags %{python3} setup.py linux-package \ --libdir-name=%{_lib} \ --update-check-interval=0 \ --ignore-compiler-warnings \ --verbose unset LDFLAGS mkdir -p _build/bin %gobuild -o _build/bin/kitten ./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 flaky test")' -i kitty_tests/ssh.py export %{gomodulesmode} # 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 vendor/modules.txt %{_bindir}/%{name} %{_bindir}/kitten %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/*/*.{png,svg} %{_libdir}/%{name}/ %if %{with doc} %{_mandir}/man{1,5}/*.{1,5}* %endif %{_metainfodir}/*.xml %files terminfo %license LICENSE %{_datadir}/terminfo/x/xterm-%{name} %if %{with doc} %files doc %license LICENSE %doc CONTRIBUTING.md CHANGELOG.rst INSTALL.md %{_docdir}/%{name}/html %dir %{_docdir}/%{name} %endif %changelog * Mon Jul 17 2023 Pavel Solovev - 0.29.1-1 - Uncommitted changes * 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