2018-03-23 10:39:09 +01:00
|
|
|
#
|
|
|
|
# spec file for package kitty
|
|
|
|
#
|
2024-01-19 19:04:25 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-03-23 10:39:09 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2021-04-16 13:50:24 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-03-23 10:39:09 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-04-18 20:20:57 +02:00
|
|
|
# sphinx_copybutton not in Factory
|
|
|
|
%bcond_with docs
|
2018-03-23 10:39:09 +01:00
|
|
|
Name: kitty
|
2024-02-12 16:25:40 +01:00
|
|
|
Version: 0.32.2
|
2018-03-23 10:39:09 +01:00
|
|
|
Release: 0
|
2019-04-23 08:13:31 +02:00
|
|
|
Summary: A GPU-based terminal emulator
|
2018-03-23 10:39:09 +01:00
|
|
|
License: GPL-3.0-only
|
|
|
|
Group: System/X11/Terminals
|
|
|
|
URL: https://github.com/kovidgoyal/kitty
|
2018-04-16 11:53:19 +02:00
|
|
|
Source: https://github.com/kovidgoyal/kitty/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2023-03-27 11:03:42 +02:00
|
|
|
Source1: vendor.tar.gz
|
2023-07-10 18:13:33 +02:00
|
|
|
Source2: kitty-rpmlintrc
|
2024-01-19 19:04:25 +01:00
|
|
|
Patch0: buildmode-and-skip_docs.diff
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: ImageMagick-devel
|
|
|
|
BuildRequires: Mesa-libGL-devel
|
2021-04-16 13:50:24 +02:00
|
|
|
BuildRequires: fdupes
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: fontconfig-devel
|
|
|
|
BuildRequires: freetype2-devel
|
2023-03-27 11:03:42 +02:00
|
|
|
BuildRequires: go >= 1.20
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: harfbuzz-devel >= 1.5.0
|
|
|
|
BuildRequires: libXcursor-devel
|
|
|
|
BuildRequires: libXi-devel
|
|
|
|
BuildRequires: libXinerama-devel
|
|
|
|
BuildRequires: libXrandr-devel
|
2021-04-16 13:50:24 +02:00
|
|
|
BuildRequires: libcanberra-devel
|
|
|
|
BuildRequires: liblcms2-devel
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: libpng16-compat-devel
|
2022-01-07 14:58:24 +01:00
|
|
|
BuildRequires: librsync-devel
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: libxkbcommon-devel
|
|
|
|
BuildRequires: libxkbcommon-x11-devel
|
|
|
|
BuildRequires: ncurses-devel
|
2023-09-25 11:23:45 +02:00
|
|
|
BuildRequires: openssl-devel
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: pkgconfig
|
2021-04-16 13:50:24 +02:00
|
|
|
BuildRequires: terminfo
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: wayland-devel
|
|
|
|
BuildRequires: wayland-protocols-devel
|
2023-09-25 11:23:45 +02:00
|
|
|
BuildRequires: xxhash-devel
|
2018-03-23 10:39:09 +01:00
|
|
|
BuildRequires: zlib-devel
|
2021-04-16 13:50:24 +02:00
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
2022-04-18 20:20:57 +02:00
|
|
|
# Python requirements for Factory and Leap
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
BuildRequires: python3-devel >= 3.7
|
|
|
|
BuildRequires: python3-sphinxext-opengraph
|
|
|
|
%else
|
|
|
|
# Leap still provides python3.6 kitty requires at least 3.7
|
2023-07-07 17:39:05 +02:00
|
|
|
%if 0%{?sle_version} > 150400
|
|
|
|
BuildRequires: python311-devel
|
|
|
|
%else
|
|
|
|
%if 0%{?sle_version} > 150300
|
|
|
|
BuildRequires: python310-devel
|
|
|
|
%else
|
2022-04-18 20:20:57 +02:00
|
|
|
BuildRequires: python39-devel
|
|
|
|
%endif
|
2023-07-07 17:39:05 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
2022-04-18 20:20:57 +02:00
|
|
|
# Optional documentation requirements
|
|
|
|
%if %{with docs}
|
2021-04-16 13:50:24 +02:00
|
|
|
BuildRequires: python3-Sphinx >= 1.7
|
2022-04-18 20:20:57 +02:00
|
|
|
BuildRequires: python3-importlib-resources
|
|
|
|
BuildRequires: python3-readthedocs-sphinx-ext
|
|
|
|
BuildRequires: python3-sphinx-inline-tabs
|
|
|
|
BuildRequires: python3-sphinxcontrib-copybutton
|
2021-04-16 13:50:24 +02:00
|
|
|
%endif
|
2023-07-07 17:39:05 +02:00
|
|
|
Recommends: %{name}-shell-integration
|
|
|
|
Recommends: %{name}-terminfo
|
|
|
|
Recommends: python3-importlib_resources
|
2018-03-23 10:39:09 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
A terminal emulator that uses OpenGL for rendering.
|
2019-04-23 08:13:31 +02:00
|
|
|
Supports terminal features like: graphics, Unicode,
|
2018-03-23 10:39:09 +01:00
|
|
|
true-color, OpenType ligatures, mouse protocol, focus tracking,
|
2019-04-23 08:13:31 +02:00
|
|
|
bracketed paste and so on, and which can be controlled by scripts.
|
2018-03-23 10:39:09 +01:00
|
|
|
|
2023-07-07 17:39:05 +02:00
|
|
|
%package terminfo
|
|
|
|
Summary: The terminfo file for the Kitty terminal
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description terminfo
|
|
|
|
Provides 'xterm-kitty' terminfo file(s) for the Kitty terminal; this package can be installed on its own to provide file(s) instead of the full kitty package on remote systems.
|
|
|
|
|
|
|
|
%package shell-integration
|
|
|
|
Summary: The shell-integation file(s) for the Kitty terminal
|
|
|
|
|
|
|
|
%description shell-integration
|
|
|
|
shell-integration [bash,fish,zsh] file(s) for the Kitty terminal; this package can be installed on its own to provide file(s) instead of the full kitty package on remote systems.
|
|
|
|
|
2018-03-23 10:39:09 +01:00
|
|
|
%prep
|
2024-02-26 11:49:37 +01:00
|
|
|
%autosetup -p0 -a 1
|
2018-11-27 10:01:22 +01:00
|
|
|
|
2022-04-18 20:20:57 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3@' {} +
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python@' {} +
|
|
|
|
%else
|
2023-07-07 17:39:05 +02:00
|
|
|
%if 0%{?sle_version} > 150400
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.11@' {} +
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.11@' {} +
|
|
|
|
%else
|
|
|
|
%if 0%{?sle_version} > 150300
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.10@' {} +
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.10@' {} +
|
|
|
|
%else
|
2022-04-18 20:20:57 +02:00
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.9@' {} +
|
|
|
|
find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.9@' {} +
|
|
|
|
%endif
|
2023-07-07 17:39:05 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%build
|
2018-03-23 10:39:09 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
# yes they have a makefile, no they dont use it properly
|
|
|
|
# no they dont have a make install
|
2021-04-16 14:05:52 +02:00
|
|
|
# we used to have this in the build section but since rpm 4.16 buildroot is cleaned
|
2023-07-07 17:39:05 +02:00
|
|
|
#
|
|
|
|
# See: https://build.opensuse.org/request/show/1096854
|
|
|
|
# Set -Wno-error=switch flag to prevent compiler crashes
|
|
|
|
#export CFLAGS="${CFLAGS:-%%optflags} -Wno-error=switch"
|
|
|
|
#export CXXFLAGS="${CXXFLAGS:-%%optflags} -Wno-error=switch"
|
|
|
|
#
|
2024-01-26 16:48:06 +01:00
|
|
|
### This might have been fixed as part of #gh/kovidgoyal/kitty/7026
|
|
|
|
#%%ifarch i586
|
|
|
|
#export CFLAGS="${CFLAGS:-%%optflags} -fcf-protection=none"
|
|
|
|
#%%endif
|
|
|
|
#####
|
2022-04-18 20:20:57 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
python3 \
|
|
|
|
%else
|
2023-07-07 17:39:05 +02:00
|
|
|
%if 0%{?sle_version} > 150400
|
|
|
|
python3.11 -B \
|
|
|
|
%else
|
|
|
|
%if 0%{?sle_version} > 150300
|
|
|
|
python3.10 -B \
|
|
|
|
%else
|
2022-04-18 20:20:57 +02:00
|
|
|
python3.9 -B \
|
2023-07-07 17:39:05 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
2022-04-18 20:20:57 +02:00
|
|
|
%endif
|
2024-01-19 19:04:25 +01:00
|
|
|
setup.py --verbose linux-package --prefix %{buildroot}%{_prefix} --libdir-name %{_lib}
|
2018-03-23 10:39:09 +01:00
|
|
|
|
2022-04-18 20:20:57 +02:00
|
|
|
%fdupes %{buildroot}%{_libdir}/%{name}
|
2019-05-24 14:41:58 +02:00
|
|
|
|
2018-03-23 10:39:09 +01:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%doc CHANGELOG.rst README.asciidoc
|
2021-04-16 13:50:24 +02:00
|
|
|
%{_bindir}/%{name}
|
2023-03-27 11:03:42 +02:00
|
|
|
%{_bindir}/kitten
|
2022-04-18 20:20:57 +02:00
|
|
|
%{_libdir}/%{name}
|
2023-07-07 17:39:05 +02:00
|
|
|
%exclude %{_libdir}/%{name}/shell-integration
|
2022-04-18 20:20:57 +02:00
|
|
|
%{_datadir}/applications/%{name}{,-open}.desktop
|
2021-12-08 15:34:40 +01:00
|
|
|
%{_datadir}/icons/hicolor/
|
2022-04-18 20:20:57 +02:00
|
|
|
%if %{with docs}
|
2021-04-16 13:50:24 +02:00
|
|
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
|
|
|
%{_datadir}/doc/%{name}
|
2021-05-06 09:50:48 +02:00
|
|
|
%{_mandir}/man5/kitty.conf.5%{?ext_man}
|
2018-11-27 10:01:22 +01:00
|
|
|
%endif
|
2018-03-23 10:39:09 +01:00
|
|
|
|
2023-07-07 17:39:05 +02:00
|
|
|
%files terminfo
|
|
|
|
%license LICENSE
|
|
|
|
%doc CHANGELOG.rst README.asciidoc
|
|
|
|
%{_datadir}/terminfo/x/xterm-%{name}
|
|
|
|
|
|
|
|
%files shell-integration
|
|
|
|
%license LICENSE
|
|
|
|
%doc CHANGELOG.rst README.asciidoc
|
|
|
|
%{_libdir}/%{name}/shell-integration
|
|
|
|
|
2018-03-23 10:39:09 +01:00
|
|
|
%changelog
|