commit 5a9822dc8bf13c92ead8d821631ca8f101165852 Author: Elan Ruusamäe <g...@pld-linux.org> Date: Wed Feb 22 16:52:14 2023 +0200
Create from Fedora package, version 0.27.1 Fedora package commit: 2c6db34 README.md | 3 + kitty.appdata.xml | 51 ++++++++++++ kitty.fish | 8 ++ kitty.sh | 7 ++ kitty.spec | 229 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 298 insertions(+) --- diff --git a/kitty.spec b/kitty.spec new file mode 100644 index 0000000..bfc5cfd --- /dev/null +++ b/kitty.spec @@ -0,0 +1,229 @@ +# +# Conditional build: +%bcond_without tests # build without tests +%bcond_without docs # build without docs + +Summary: Cross-platform, fast, feature full, GPU based terminal emulator +Name: kitty +Version: 0.27.1 +Release: 0.1 +# BSD: docs/_templates/searchbox.html +# zlib: glfw/ +License: GPLv3 and zlib and BSD +URL: https://sw.kovidgoyal.net/kitty +Source0: https://github.com/kovidgoyal/kitty/releases/download/v%{version}/%{name}-%{version}.tar.xz +# Source0-md5: 3e24876ca288589dfab398de81b02614 +# Add AppData manifest file +# * https://github.com/kovidgoyal/kitty/pull/2088 +Source1: https://raw.githubusercontent.com/kovidgoyal/kitty/46c0951751444e4f4994008f0d2dcb41e49389f4/kitty/data/%{name}.appdata.xml +# Source1-md5: 702c51cea58e8b0fb8fd67da9da3802a +Source2: %{name}.sh +Source3: %{name}.fish +BuildRequires: appstream-glib +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: fontconfig-devel +BuildRequires: gcc +BuildRequires: gnupg2 +BuildRequires: harfbuzz-devel >= 2.2 +BuildRequires: lcms2-devel +BuildRequires: libcanberra-devel +BuildRequires: libglvnd-libGL-devel +BuildRequires: libpng-devel +BuildRequires: librsync-devel +BuildRequires: ncurses +BuildRequires: openssl-devel +BuildRequires: python3-devel >= 1:3.8 +BuildRequires: python3dist(setuptools) +BuildRequires: rpm-build >= 4.6 +BuildRequires: wayland-devel +BuildRequires: wayland-protocols +BuildRequires: xorg-lib-libXcursor-devel +BuildRequires: xorg-lib-libXi-devel +BuildRequires: xorg-lib-libXinerama-devel +BuildRequires: xorg-lib-libXrandr-devel +BuildRequires: xorg-lib-libxkbcommon-x11-devel +BuildRequires: zlib-devel +%if %{with docs} +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinx-copybutton) +BuildRequires: python3dist(sphinx-inline-tabs) +# Missing in pld +#BuildRequires: python3dist(sphinxext-opengraph) +%endif +%if %{with tests} +BuildRequires: /usr/bin/getent +BuildRequires: /usr/bin/ssh +%endif +Requires: hicolor-icon-theme +Requires: python3 +Suggests: %{name}-bash-integration +Suggests: %{name}-fish-integration +# 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 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define specflags -Wno-array-bounds + +%description +- 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 platforms. +- 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 bash-integration +Summary: Automatic Bash integration for Kitty Terminal +BuildArch: noarch + +%description bash-integration +Cross-platform, fast, feature full, GPU based terminal emulator. + +Bash integration for Kitty Terminal. + +%package fish-integration +Summary: Automatic Fish integration for Kitty Terminal +BuildArch: noarch + +%description fish-integration +Cross-platform, fast, feature full, GPU based terminal emulator. + +Fish integration for Kitty Terminal. + +%package terminfo +Summary: The terminfo file for Kitty Terminal +Requires: ncurses +BuildArch: noarch + +%description terminfo +Cross-platform, fast, feature full, GPU based terminal emulator. + +The terminfo file for Kitty Terminal. + +%package doc +Summary: Documentation for %{name} + +%description doc +This package contains the documentation for %{name}. + +%prep +%autosetup -p1 + +# Changing sphinx theme to classic +sed "s/html_theme = 'furo'/html_theme = 'classic'/" -i docs/conf.py + +find -type f -name "*.py" | xargs sed -i \ + -e 's|%{_bindir}/env python3|%{__python3}|g' \ + -e 's|%{_bindir}/env python|%{__python3}|g' \ + -e 's|%{_bindir}/env -S kitty|%{_bindir}/kitty|g' \ + %{nil} + +# non-executable-script +sed -e "s/f.endswith('\.so')/f.endswith('\.so') or f.endswith('\.py')/g" -i setup.py + +# script-without-shebang '__init__.py' +find -type f -name "*.py*" | xargs chmod a-x + +%install +rm -rf $RPM_BUILD_ROOT +%set_build_flags +export CC="%{__cc}" +export CXX="%{__cxx}" +%{__python3} setup.py linux-package \ + --libdir-name=%{_lib} \ + --prefix=$RPM_BUILD_ROOT%{_prefix} \ + --update-check-interval=0 \ + --verbose \ + --debug \ + --shell-integration "disabled" \ + %{nil} + +install -Dp %{SOURCE1} $RPM_BUILD_ROOT%{_metainfodir}/%{name}.appdata.xml + +install -Dp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/%{name}.sh +install -Dp %{SOURCE3} $RPM_BUILD_ROOT%{fish_compdir}/%{name}.fish + +sed 's|KITTY_INSTALLATION_DIR=.*|KITTY_INSTALLATION_DIR="%{_libdir}/%{name}"|' \ + -i $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/%{name}.sh +sed 's|set -l KITTY_INSTALLATION_DIR .*|set -l KITTY_INSTALLATION_DIR "%{_libdir}/%{name}"|' \ + -i $RPM_BUILD_ROOT%{fish_compdir}/%{name}.fish + +# script-without-shebang '__init__.py' +find $RPM_BUILD_ROOT -type f -name "*.py*" ! -name askpass.py | xargs chmod a-x + +%if %{with doc} +# rpmlint fixes +rm $RPM_BUILD_ROOT%{_docdir}/%{name}/html/.buildinfo \ + $RPM_BUILD_ROOT%{_docdir}/%{name}/html/.nojekyll +%endif + +%if %{with tests} +# Some tests ignores PATH env... +install -d kitty/launcher +ln -s $RPM_BUILD_ROOT%{_bindir}/%{name} kitty/launcher +export PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH +%{__python3} setup.py test \ + --prefix=$RPM_BUILD_ROOT%{_prefix} +%endif + +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.xml +desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/*.desktop + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc LICENSE +%attr(755,root,root) %{_bindir}/%{name} +%{_desktopdir}/*.desktop +%{_iconsdir}/hicolor/*/*/*.{png,svg} +%{_libdir}/%{name}/ +%if %{with doc} +%{_mandir}/man{1,5}/*.{1,5}* +%endif +%{_metainfodir}/*.xml + +%files bash-integration +%defattr(644,root,root,755) +/etc/profile.d/%{name}.sh + +%files fish-integration +%defattr(644,root,root,755) +%{fish_compdir}/%{name}.fish + +%files terminfo +%defattr(644,root,root,755) +%doc LICENSE +%{_datadir}/terminfo/x/xterm-%{name} + +%if %{with doc} +%files doc +%defattr(644,root,root,755) +%doc LICENSE +%doc CONTRIBUTING.md CHANGELOG.rst INSTALL.md +%{_docdir}/%{name}/html +%dir %{_docdir}/%{name} +%endif diff --git a/README.md b/README.md new file mode 100644 index 0000000..0044d15 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# kitty + +The kitty package \ No newline at end of file diff --git a/kitty.appdata.xml b/kitty.appdata.xml new file mode 100644 index 0000000..c273aea --- /dev/null +++ b/kitty.appdata.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright 2019 Artem Polishchuk <ego.corda...@gmail.com> --> +<component type="desktop"> + <id>kitty</id> + <metadata_license>CC0</metadata_license> + <project_license>GPL-3.0-or-later</project_license> + <name>kitty</name> + <summary>Cross-platform, fast, feature full, GPU based terminal emulator</summary> + <description> + <p>- 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 + platforms. + +- 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.</p> + </description> + <provides> + <binary>kitty</binary> + </provides> + <screenshots> + <screenshot type="default"> + <image>https://sw.kovidgoyal.net/kitty/_images/screenshot.png</image> + </screenshot> + </screenshots> + <developer_name>Kovid Goyal</developer_name> + <url type="homepage">https://sw.kovidgoyal.net/kitty</url> + <url type="bugtracker">https://github.com/kovidgoyal/kitty/issues</url> + <url type="donation">https://sw.kovidgoyal.net/kitty/support.html</url> +</component> diff --git a/kitty.fish b/kitty.fish new file mode 100644 index 0000000..4d7da78 --- /dev/null +++ b/kitty.fish @@ -0,0 +1,8 @@ +set -l KITTY_INSTALLATION_DIR "/usr/lib/kitty" +if test -n "$KITTY_PID" + if test -f "$KITTY_INSTALLATION_DIR"/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish + set --global KITTY_SHELL_INTEGRATION enabled + source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" + set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" + end +end diff --git a/kitty.sh b/kitty.sh new file mode 100644 index 0000000..fe4b396 --- /dev/null +++ b/kitty.sh @@ -0,0 +1,7 @@ +KITTY_INSTALLATION_DIR="/usr/lib/kitty" +if [[ -n "${BASH_VERSION}" && -n "${KITTY_PID}" ]]; then + if [[ -f "$KITTY_INSTALLATION_DIR"/shell-integration/bash/kitty.bash ]]; then + export KITTY_SHELL_INTEGRATION="enabled" + source "$KITTY_INSTALLATION_DIR"/shell-integration/bash/kitty.bash + fi +fi ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/kitty.git/commitdiff/ae545fb2edec3bc476ef14d92e7dd2c4b31e9021 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit