# Enable or disable running the tests %global tests 0 # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %global __brp_mangle_shebangs_exclude_from .*ssh/askpass\.py Name: kitty Version: 0.26.5 Release: 2%{?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 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 BuildRequires: wayland-protocols-devel BuildRequires: pkgconfig(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) %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: (imagemagick or /usr/bin/magick) Requires: harfbuzz Requires: freetype2 Requires: fontconfig Requires: %{mklibname canberra-gtk 3 0} Requires: (imagemagick or /usr/bin/magick) 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 %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 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} cp %{S:1} %{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} %{_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}/man5/%{name}* %{_datadir}/doc/%{name}/html/ %files terminfo %{_datadir}/terminfo/x/xterm-kitty