Blob Blame History Raw
# Enable LTO
%global optflags        %{optflags} -flto
%global build_ldflags   %{build_ldflags} -flto

Name:           kitty
Version:        0.16.0
Release:        3%{?dist}
Summary:        Cross-platform, fast, feature full, GPU based terminal emulator

ExcludeArch:    s390x

# BSD:          docs/_templates/searchbox.html
# zlib:         glfw/
License:        GPLv3 and zlib and BSD

# Add AppData manifest file
# *

Patch0:         kitty-0.16.0-gcc10.patch

BuildRequires:  desktop-file-utils
BuildRequires:  gcc
BuildRequires:  libappstream-glib
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  wayland-devel
BuildRequires:  wayland-protocols-devel
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(harfbuzz)
BuildRequires:  pkgconfig(libcanberra)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xkbcommon-x11)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(zlib)

Requires:       python3%{?_isa}
Requires:       hicolor-icon-theme

# 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
Recommends:     python3-pygments
Suggests:       ImageMagick%{?_isa}

- 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

- 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.

%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.

%package        doc
Summary:        Documentation for %{name}

BuildRequires:  python3dist(sphinx)

%description    doc
This package contains the documentation for %{name}.

%autosetup -p1

# 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'   \
                                    -i "{}" \;

# non-executable-script
sed -e "s/f.endswith('\.so')/f.endswith('\.so') or f.endswith('\.py')/g" -i

# script-without-shebang ''
find -type f -name "*.py*" -exec chmod -x "{}"  \;

# Disable native optimizations
sed -i 's|native_optimizations=True|native_optimizations=False|'


# Project using custom build scripts :(
%{__python3} build

%{__python3} linux-package \
    --libdir-name=%{_lib}           \
    --prefix=%{buildroot}%{_prefix} \
    --update-check-interval=0       \
install -m 0644 -Dp %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.appdata.xml

# script-without-shebang ''
find %{buildroot} -type f -name "*.py*" -exec chmod -x "{}"  \;

# rpmlint fixes
rm %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo \

%{__python3} test --prefix=%{buildroot}%{_prefix}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop

%license LICENSE

%files terminfo
%license LICENSE

%files doc
%license LICENSE
%doc CHANGELOG.rst
%dir %{_datadir}/doc/%{name}

* 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