std / rpms / kitty

Forked from rpms/kitty 2 years ago
Clone

Blame kitty.spec

91033f9
# Enable LTO
91033f9
%global optflags        %{optflags} -flto
91033f9
%global build_ldflags   %{build_ldflags} -flto
91033f9
91033f9
Name:           kitty
66fa275
Version:        0.15.1
c5cb8bd
Release:        1%{?dist}
91033f9
Summary:        Cross-platform, fast, feature full, GPU based terminal emulator
91033f9
91033f9
# BSD:          docs/_templates/searchbox.html
66fa275
# zlib:         glfw/
91033f9
License:        GPLv3 and zlib and BSD
91033f9
URL:            https://sw.kovidgoyal.net/kitty
91033f9
Source0:        https://github.com/kovidgoyal/kitty/archive/v%{version}/%{name}-%{version}.tar.gz
91033f9
91033f9
# https://github.com/kovidgoyal/kitty/pull/2088
91033f9
Source1:        https://raw.githubusercontent.com/kovidgoyal/kitty/46c0951751444e4f4994008f0d2dcb41e49389f4/kitty/data/%{name}.appdata.xml
91033f9
91033f9
BuildRequires:  desktop-file-utils
91033f9
BuildRequires:  gcc
91033f9
BuildRequires:  libappstream-glib
91033f9
BuildRequires:  python3-devel
91033f9
BuildRequires:  python3dist(setuptools)
91033f9
BuildRequires:  wayland-devel
91033f9
BuildRequires:  wayland-protocols-devel
91033f9
BuildRequires:  pkgconfig(dbus-1)
91033f9
BuildRequires:  pkgconfig(fontconfig)
91033f9
BuildRequires:  pkgconfig(gl)
91033f9
BuildRequires:  pkgconfig(harfbuzz)
91033f9
BuildRequires:  pkgconfig(libcanberra)
91033f9
BuildRequires:  pkgconfig(libpng)
91033f9
BuildRequires:  pkgconfig(xcursor)
91033f9
BuildRequires:  pkgconfig(xi)
91033f9
BuildRequires:  pkgconfig(xinerama)
91033f9
BuildRequires:  pkgconfig(xkbcommon-x11)
91033f9
BuildRequires:  pkgconfig(xrandr)
91033f9
BuildRequires:  pkgconfig(zlib)
91033f9
Requires:       python3%{?_isa}
91033f9
Requires:       hicolor-icon-theme
91033f9
91033f9
# Terminfo file has been split from the main program and is required for use without errors.
91033f9
# It has been separated to support SSH into remote machines using kitty as per the maintainers suggestion.
91033f9
# Install the terminfo file on the remote machine.
91033f9
Requires:       %{name}-terminfo = %{version}-%{release}
91033f9
66fa275
# Very weak dependencies, these are required to enable all features of kitty's "kittens" functions install
66fa275
# separately
91033f9
Recommends:     python3-pygments
91033f9
Suggests:       ImageMagick%{?_isa}
91033f9
91033f9
%description
91033f9
- Offloads rendering to the GPU for lower system load and buttery smooth
91033f9
  scrolling. Uses threaded rendering to minimize input latency.
91033f9
91033f9
- Supports all modern terminal features: graphics (images), unicode, true-color,
91033f9
  OpenType ligatures, mouse protocol, focus tracking, bracketed paste and
91033f9
  several new terminal protocol extensions.
91033f9
91033f9
- Supports tiling multiple terminal windows side by side in different layouts
91033f9
  without needing to use an extra program like tmux.
91033f9
91033f9
- Can be controlled from scripts or the shell prompt, even over SSH.
91033f9
91033f9
- Has a framework for Kittens, small terminal programs that can be used to
91033f9
  extend kitty's functionality. For example, they are used for Unicode input,
91033f9
  Hints and Side-by-side diff.
91033f9
91033f9
- Supports startup sessions which allow you to specify the window/tab layout,
91033f9
  working directories and programs to run on startup.
91033f9
91033f9
- Cross-platform: kitty works on Linux and macOS, but because it uses only
91033f9
  OpenGL for rendering, it should be trivial to port to other Unix-like
91033f9
  platforms.
91033f9
91033f9
- Allows you to open the scrollback buffer in a separate window using arbitrary
91033f9
  programs of your choice. This is useful for browsing the history comfortably
91033f9
  in a pager or editor.
91033f9
91033f9
- Has multiple copy/paste buffers, like vim.
91033f9
91033f9
91033f9
%package        terminfo
91033f9
Summary:        The terminfo file for Kitty Terminal
91033f9
BuildArch:      noarch
91033f9
91033f9
Requires:       ncurses-base
91033f9
91033f9
%description    terminfo
91033f9
Cross-platform, fast, feature full, GPU based terminal emulator.
91033f9
91033f9
The terminfo file for Kitty Terminal.
91033f9
91033f9
91033f9
%package        doc
91033f9
Summary:        Documentation for %{name}
91033f9
91033f9
BuildRequires:  python3dist(sphinx)
91033f9
91033f9
%description    doc
91033f9
This package contains the documentation for %{name}.
91033f9
91033f9
91033f9
%prep
91033f9
%autosetup
91033f9
# Replace python shebangs to make them compatible with fedora
91033f9
find -type f -name "*.py" -exec sed -e 's@/usr/bin/env python3@%{__python3}@g' -e 's@/usr/bin/env python@%{__python3}@g' -i "{}" \;
91033f9
91033f9
# non-executable-script
91033f9
sed -e "s/f.endswith('\.so')/f.endswith('\.so') or f.endswith('\.py')/g" -i setup.py
91033f9
91033f9
# script-without-shebang '__init__.py'
91033f9
find -type f -name "*.py*" -empty -exec chmod -x "{}"  \;
91033f9
e7dbb6b
# Disable native optimizations
66fa275
sed -i 's|native_optimizations=True|native_optimizations=False|' setup.py
e7dbb6b
91033f9
91033f9
%build
91033f9
%set_build_flags
91033f9
# Project using custom build scripts :(
91033f9
%{__python3} setup.py build
91033f9
91033f9
91033f9
%install
91033f9
%{__python3} setup.py linux-package --libdir-name=%{_lib} --prefix=%{buildroot}%{_prefix} --update-check-interval=0 --debug
91033f9
install -m 0644 -Dp %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.appdata.xml
91033f9
91033f9
# script-without-shebang '__init__.py'
91033f9
find %{buildroot} -type f -name "*.py*" -empty -exec chmod -x "{}"  \;
91033f9
91033f9
# rpmlint fixes
66fa275
rm %{buildroot}%{_datadir}/doc/%{name}/html/.buildinfo \
66fa275
   %{buildroot}%{_datadir}/doc/%{name}/html/.nojekyll
91033f9
91033f9
91033f9
%check
91033f9
%{__python3} setup.py test --prefix=%{buildroot}%{_prefix}
91033f9
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
91033f9
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
91033f9
91033f9
91033f9
%files
91033f9
%license LICENSE
91033f9
%{_bindir}/%{name}
91033f9
%{_datadir}/applications/*.desktop
91033f9
%{_datadir}/icons/hicolor/*/*/*.png
91033f9
%{_libdir}/%{name}
91033f9
%{_mandir}/man1/*
91033f9
%{_metainfodir}/*.xml
91033f9
91033f9
%files terminfo
91033f9
%license LICENSE
91033f9
%{_datadir}/terminfo/x/xterm-%{name}
91033f9
91033f9
%files doc
91033f9
%license LICENSE
91033f9
%doc CONTRIBUTING.md CHANGELOG.rst INSTALL.md
91033f9
%{_datadir}/doc/%{name}/html
91033f9
%dir %{_datadir}/doc/%{name}
91033f9
91033f9
91033f9
%changelog
66fa275
* Thu Jan 02 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.15.1-1
66fa275
- Update to 0.15.1
66fa275
c5cb8bd
* Wed Nov 27 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.15.0-1
c5cb8bd
- Update to 0.15.0
c5cb8bd
33f72ec
* Sun Oct 20 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.14.6-12
91033f9
- Update to 0.14.6
91033f9
- Spec file fixes
91033f9
- Thanks to Vitaly Zaitsev <vitaly@easycoding.org>
91033f9
91033f9
* Fri Jul 12 2019 eskse <eskse@users.noreply.github.com> 0.14.2-1
91033f9
- Initial version of file