# Enable or disable running the tests %global tests 0 %global __brp_mangle_shebangs_exclude_from .*ssh/askpass\.py # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif Name: kitty Version: 0.32.2 Release: 1%{?dist} Summary: A cross-platform, fast, feature full, GPU based terminal emulator Group: Terminals License: GPLv3 URL: https://sw.kovidgoyal.net/kitty/ Source0: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz # kitty.conf created by kekepower. # Default is located in /etc/xdg/kitty/kitty.conf #Source1: kitty.conf # Go vendor source for kitty Source2: kitty-%{version}-go-vendor.tar.gz Patch1: kitty-0.27.0-extend-ldflags.patch # # Security patches # P100 -> ... BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(xcursor) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(xkbcommon-x11) BuildRequires: pkgconfig(fontconfig) BuildRequires: fontconfig BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(freetype2) BuildRequires: python3dist(pillow) BuildRequires: wayland-devel >= 1.23.0 BuildRequires: wayland-protocols-devel BuildRequires: (wayland-tools or pkgconfig(wayland-scanner) or /usr/bin/wayland-scanner) BuildRequires: pkgconfig(lcms2) BuildRequires: (rsync-devel or librsync-devel) BuildRequires: pkgconfig(openssl) BuildRequires: git-core BuildRequires: golang BuildRequires: gcc BuildRequires: (ncurses or /usr/bin/tic) BuildRequires: pkgconfig(libxxhash) #BuildRequires: pkgconfig(simde) %if %{tests} # This is required to run the tests BuildRequires: texlive-fontsextra %endif # ImageMagick is needed to resize the app icon to all sizes BuildRequires: (graphicsmagick or imagemagick or ImageMagick or /usr/bin/convert) Requires: harfbuzz Requires: freetype2 Requires: fontconfig Requires: (%{_lib}canberra-gtk3_0 or /usr/%{_lib}/libcanberra-gtk3.so.0%{?isa}) Requires: (graphicsmagick or imagemagick or ImageMagick or /usr/bin/convert) Requires: python3dist(pygments) Requires: %{name}-terminfo = %{version}-%{release} Recommends: %{name}-docs = %{version}-%{release} %description kitty is a cross-platform, fast, feature full, GPU based terminal emulator. It is designed for power keyboard users. To that end all its controls work with the keyboard (although it fully supports mouse interactions as well). Its configuration is a simple, human editable, single file for easy reproducibility (I like to store configuration in source control). Finally, kitty is designed from the ground up to support all modern terminal features, such as unicode, true color, bold/italic fonts, text formatting, etc. It even extends existing text formatting escape codes, to add support for features not available elsewhere, such as colored and styled (curly) underlines. One of the design goals of kitty is to be easily extensible so that new features can be added in the future with relatively little effort. %package terminfo Summary: Terminfo for %{name} Group: Terminals License: GPLv3 BuildArch: noarch %description terminfo Terminal info for %{name}. You can install this package on, for example, servers you want to log on to remotely to enable all the features available in %{name} without having to install the whole program. %package docs Summary: Documentation for %{name} Group: Terminals License: GPLv3 BuildArch: noarch %Description docs %{summary}. %prep %autosetup -S git -a2 %build # We want to control when to update this package and that is done with the # option "--update-check-interval=0" %{__python3} setup.py linux-package \ --prefix %{_real_vendor}-%{_arch} \ --update-check-interval=0 \ --verbose \ --debug \ --libdir-name %{_lib} # Fix the path to Python 3 %if 0%{?py3_shebang_fix:1} %py3_shebang_fix %{_real_vendor}-%{_arch}/%{_lib}/kitty/ %endif # Convert the app icon to all the sizes mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/16x16/apps mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/32x32/apps mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/64x64/apps mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/128x128/apps mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/256x256/apps mkdir -p %{_real_vendor}-%{_arch}/share/icons/hicolor/512x512/apps %{_bindir}/gm convert logo/kitty.iconset/icon_512x512.png \ -resize 64x64 logo/kitty.iconset/icon_64x64.png cp logo/kitty.iconset/icon_16x16.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/16x16/apps/%{name}.png cp logo/kitty.iconset/icon_32x32.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/32x32/apps/%{name}.png cp logo/kitty.iconset/icon_64x64.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/64x64/apps/%{name}.png cp logo/kitty.iconset/icon_128x128.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/128x128/apps/%{name}.png cp logo/kitty.iconset/icon_256x256.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/256x256/apps/%{name}.png cp logo/kitty.iconset/icon_512x512.png \ %{_real_vendor}-%{_arch}/share/icons/hicolor/512x512/apps/%{name}.png %install mkdir -p %{buildroot}%{_prefix} cp -af %{_real_vendor}-%{_arch}/* %{buildroot}%{_prefix} mkdir -p %{buildroot}%{_sysconfdir}/xdg/%{name} cat docs/_build/html/_downloads/433dadebd0bf504f8b008985378086ce/kitty.conf | sed -e 's,^#\s\+\(\S\+\s\),\1,g' > %{buildroot}%{_sysconfdir}/xdg/%{name}/%{name}.conf #mkdir -p %{buildroot}/%{_mandir}/man5 #mv %{buildroot}/%{_mandir}/man1/*5* %{buildroot}/%{_mandir}/man5/ %if %{tests} %check %{__python3} setup.py test %endif %files %license LICENSE %doc README.asciidoc %{_bindir}/%{name} %{_bindir}/kitten %{_datadir}/applications/%{name}*.desktop %{_datadir}/icons/hicolor/*/apps/%{name}* %{_libdir}/%{name}/ %config(noreplace) %{_sysconfdir}/xdg/%{name}/%{name}.conf %exclude %{_mandir}/man1/%{name}* %exclude %{_datadir}/doc/%{name}/html/ %exclude %{_datadir}/terminfo/x/xterm-kitty %files docs %{_mandir}/man1/%{name}.1* %{_mandir}/man1/kitten* %{_mandir}/man5/%{name}* %{_datadir}/doc/%{name}/html/ %files terminfo %{_datadir}/terminfo/x/xterm-kitty