%global simdutf_version 9.4.0 %global project_id com.mitchellh.ghostty %global pubkey RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV %global _zig_release_mode fast %global _zig_system_integration --system "%{_builddir}/%{buildsubdir}/zig-pkg" %global _zig_install_options --prefix "%{_prefix}" --prefix-lib-dir "%{_lib}" %global ghostty_options %{shrink: \ -Demit-lib-vt=false -Dfont-backend=fontconfig_freetype \ -Drenderer=opengl -Dsentry=false -Dsimd=true -Dgtk-x11=true -Dgtk-wayland=true \ -Di18n=true -Demit-docs=true -Dstrip=false -Dversion-string=%{version} \ -Dinstalled-exe-path=%{_bindir}/ghostty -Demit-themes=true \ -Demit-terminfo=true -Demit-termcap=true \ -fsys=fontconfig -fsys=freetype -fsys=harfbuzz -fsys=libpng -fsys=zlib \ -fsys=oniguruma -fno-sys=glslang -fsys=spirv-cross -fsys=gtk4-layer-shell \ -fsys=highway -fno-sys=simdutf \ } Name: ghostty Version: 1.4.0 Release: 2%{?dist}.whissi Summary: Fast, feature-rich terminal emulator License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-only AND MPL-2.0 AND OFL-1.1 AND Unicode-3.0 AND (WTFPL OR CC0-1.0) URL: https://ghostty.org Source0: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz Source1: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz.minisig # Generated by scripts/prepare-ghostty-cache.py; extracted, hash-verified sources. Source2: ghostty-%{version}-zig-sources.tar.xz # Source-only replacement of the upstream bundled simdutf; no system ABI change. Source3: https://github.com/simdutf/simdutf/releases/download/v%{simdutf_version}/simdutf.cpp#/simdutf-%{simdutf_version}.cpp Source4: https://github.com/simdutf/simdutf/releases/download/v%{simdutf_version}/simdutf.h#/simdutf-%{simdutf_version}.h Source5: https://raw.githubusercontent.com/simdutf/simdutf/v%{simdutf_version}/LICENSE-MIT#/simdutf-%{simdutf_version}-MIT-LICENSE Source6: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt#/GPL-2.0-or-later.txt Source7: collect-licenses.py Patch0: ghostty-1.4.0-bzip2-dependency.patch # Upstream fix: app builds must not install the separate libghostty-vt SDK. # This also avoids shipping the broken DESTDIR-containing .pc files described # in scottames/copr commit dc4a1fa80e46ca1b84e21316f217db2794663fac. Patch1: ghostty-1.4.0-libghostty-install-a-CMake-package-config-and-fix-li.patch ExclusiveArch: x86_64 BuildRequires: (zig >= 0.17.1 with zig < 0.18.0~) BuildRequires: zig-rpm-macros BuildRequires: pkgconf-pkg-config BuildRequires: minisign BuildRequires: pandoc BuildRequires: blueprint-compiler BuildRequires: gettext BuildRequires: ncurses BuildRequires: desktop-file-utils BuildRequires: systemd-rpm-macros BuildRequires: python3 BuildRequires: hostname BuildRequires: valgrind BuildRequires: bzip2-devel BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(fontconfig) >= 2.18.3 # freetype2.pc uses a different version scheme from the upstream release. BuildRequires: freetype-devel >= 2.13.2 BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(harfbuzz) >= 11.0.0 BuildRequires: pkgconfig(libpng) >= 1.6.43 BuildRequires: pkgconfig(zlib) >= 1.3.1 BuildRequires: pkgconfig(oniguruma) >= 6.9.9 BuildRequires: pkgconfig(gtk4-layer-shell-0) >= 1.1.0 BuildRequires: pkgconfig(libhwy) >= 1.2.0 BuildRequires: SPIRV-Cross-devel >= 1.4.363.0 BuildRequires: pkgconfig(spirv-cross-c-shared) BuildRequires: pkgconfig(gtk4) >= 4.18 BuildRequires: pkgconfig(libadwaita-1) >= 1.7 Requires: %{name}-terminfo = %{version}-%{release} Requires: hicolor-icon-theme # GTK's GL dispatch loads libGLESv2.so.2 dynamically during application startup. Requires: libglvnd-gles%{?_isa} # SONAME requirements alone do not express our minimum source-library versions. Requires: fontconfig%{?_isa} >= 2.18.3 Requires: freetype%{?_isa} >= 2.13.2 Requires: harfbuzz%{?_isa} >= 11.0.0 Requires: libpng%{?_isa} >= 1.6.43 Requires: zlib%{?_isa} >= 1.3.1 Requires: oniguruma%{?_isa} >= 6.9.9 Requires: gtk4-layer-shell%{?_isa} >= 1.1.0 Requires: highway%{?_isa} >= 1.2.0 Requires: SPIRV-Cross-libs%{?_isa} >= 1.4.363.0 Provides: bundled(simdutf) = %{simdutf_version} # Fedora ships glslang only as GCC-built static archives; use Ghostty's source # copy with Zig's C++ toolchain, as agreed. Provides: bundled(glslang) = 14.2.0 Provides: bundled(imgui) = 1.92.5 Provides: bundled(dearbindings) = 0.17 Provides: bundled(wuffs) = 0~git7411f488fe2e2c205c3d3b3d28638b7356522930 Provides: bundled(libxev) = 0~git819ffa180ca20e31c7eded74e2e1aceb1eab557f Provides: bundled(libvaxis) = 0.6.0 Provides: bundled(z2d) = 0.13.0 Provides: bundled(zf) = 0.11.0 Provides: bundled(zigimg) = 0.1.0 Provides: bundled(uucode) = 0.2.0 Provides: bundled(ghostty-gobject) = 0.3.2 Provides: bundled(zig-wayland) = 0.7.0~dev Provides: bundled(font(JetBrainsMonoNoNF)) = 2.304 Provides: bundled(font(NerdFontSymbolsOnly)) = 3.4.0 %description Ghostty is a terminal emulator with GPU rendering, native GTK integration, shell integration, and support for modern terminal protocols. %package terminfo Summary: Terminal description for Ghostty License: MIT BuildArch: noarch # Block monolithic packages which own this file, while permitting split builds. Conflicts: (%{_datadir}/terminfo/x/xterm-ghostty without ghostty-terminfo) %description terminfo The xterm-ghostty terminal description for applications using terminfo. Install this package on remote hosts accessed from Ghostty. %prep minisign -Vm %{SOURCE0} -x %{SOURCE1} -P %{pubkey} %autosetup -p1 %{__tar} -xf %{SOURCE2} cp -p %{SOURCE3} pkg/simdutf/vendor/simdutf.cpp cp -p %{SOURCE4} pkg/simdutf/vendor/simdutf.h cp -p %{SOURCE5} simdutf-MIT-LICENSE cp -p %{SOURCE6} GPL-2.0-or-later.txt # RPM flattens individual license paths; retain both upstream LICENSE files. cp -p vendor/nerd-fonts/LICENSE nerd-fonts-LICENSE # This manifest field is metadata only, but keep it accurate as well. sed -i 's/\.version = "5.2.8"/.version = "%{simdutf_version}"/' pkg/simdutf/build.zig.zon grep -F '#define SIMDUTF_VERSION "%{simdutf_version}"' pkg/simdutf/vendor/simdutf.h python3 %{SOURCE7} %zig_prep %build %zig_build %{ghostty_options} -Dapp-runtime=gtk %install %zig_install %{ghostty_options} -Dapp-runtime=gtk # Fedora's ncurses-term already supplies the compatibility alias. rm %{buildroot}%{_datadir}/terminfo/g/ghostty # Source descriptions belong in the independently installable terminfo package. install -d %{buildroot}%{_docdir}/%{name}-terminfo mv %{buildroot}%{_datadir}/terminfo/ghostty.{terminfo,termcap} \ %{buildroot}%{_docdir}/%{name}-terminfo/ %find_lang %{project_id} %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{project_id}.desktop %{buildroot}%{_bindir}/ghostty --version TERMINFO=%{buildroot}%{_datadir}/terminfo infocmp -x xterm-ghostty >/dev/null # Upstream requires Debug assertions for the unit tests; no graphical session. %zig_test %{ghostty_options} -Doptimize=debug -Dapp-runtime=none %files -f %{project_id}.lang %license LICENSE simdutf-MIT-LICENSE GPL-2.0-or-later.txt src/font/res/OFL.txt nerd-fonts-LICENSE bundled-licenses %doc README.md %{_bindir}/ghostty %{_datadir}/ghostty/ %{_datadir}/applications/%{project_id}.desktop %{_datadir}/metainfo/%{project_id}.metainfo.xml %{_userunitdir}/app-%{project_id}.service %{_datadir}/dbus-1/services/%{project_id}.service %{_datadir}/icons/hicolor/*/apps/%{project_id}.png %{_mandir}/man1/ghostty.1* %{_mandir}/man5/ghostty.5* %{_datadir}/bash-completion/completions/ghostty.bash %{_datadir}/fish/vendor_completions.d/ghostty.fish %{_datadir}/zsh/site-functions/_ghostty %{_datadir}/bat/syntaxes/ghostty.sublime-syntax %{_datadir}/nvim/site/*/ghostty.vim %{_datadir}/vim/vimfiles/*/ghostty.vim %{_datadir}/nautilus-python/extensions/ghostty.py %{_datadir}/kio/servicemenus/%{project_id}.desktop %files terminfo %license LICENSE %{_datadir}/terminfo/x/xterm-ghostty %doc %{_docdir}/%{name}-terminfo/ %changelog * Mon Nov 16 2026 Thomas Deutschmann - 1.4.0-2.whissi - Require the dynamically loaded OpenGL ES runtime for graphical startup * Mon Nov 16 2026 Thomas Deutschmann - 1.4.0-1.whissi - Package Ghostty and an independently installable terminfo subpackage - Prefer system libraries at least as new as the bundled sources - Bundle simdutf 9.4.0 without replacing Fedora's incompatible system ABI - Bundle upstream glslang sources for a consistent C++ build toolchain - Preserve upstream themes and resources; build offline from verified sources