# Fedora only: 1.4 needs GTK >= 4.18 and libadwaita >= 1.7, EL 10 has 4.16 / 1.6. EL chroots are excluded by the COPR chroot denylist. # Ghostty needs zig 0.17, which Fedora does not ship, so the official ziglang.org build is bundled as a build-only toolchain. %global zig_version 0.17.0 %global zig_x86_64_sha256 1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026 %global zig_aarch64_sha256 9e8d11661d4ae3bd57702a3832781e23ad151dde5798e16a5ccd503f65234ff8 %global _missing_build_ids_terminate_build 0 %global debug_package %{nil} %global ghostty_systemd_user_unitdir %{_prefix}/lib/systemd/user %global ghostty_libdir %{_prefix}/lib %global ghostty_pkgconfig_dir %{_prefix}/share/pkgconfig Name: ghostty Version: 1.4.0 Release: 2%{?dist} Summary: Fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration License: MIT URL: https://github.com/ghostty-org/ghostty Source0: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz # Both arches go in the SRPM; %%prep unpacks the one matching the build arch Source1: https://ziglang.org/download/%{zig_version}/zig-x86_64-linux-%{zig_version}.tar.xz Source2: https://ziglang.org/download/%{zig_version}/zig-aarch64-linux-%{zig_version}.tar.xz ExclusiveArch: x86_64 aarch64 BuildRequires: tar BuildRequires: xz BuildRequires: blueprint-compiler BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: glib2-devel BuildRequires: gtk4-devel >= 4.18 BuildRequires: gtk4-layer-shell-devel >= 1.0.4 BuildRequires: pkgconfig(egl) BuildRequires: harfbuzz-devel BuildRequires: libadwaita-devel >= 1.7 BuildRequires: libpng-devel BuildRequires: oniguruma-devel BuildRequires: pixman-devel BuildRequires: pkg-config BuildRequires: wayland-protocols-devel BuildRequires: zlib-ng-devel BuildRequires: curl Requires: fontconfig Requires: freetype Requires: glib2 Requires: gtk4 >= 4.18 Requires: harfbuzz Requires: libadwaita >= 1.7 Requires: libpng Requires: oniguruma Requires: pixman Requires: zlib-ng %package devel Summary: Development files for Ghostty Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for Ghostty. Includes headers and pkg-config metadata for the libghostty-vt API. %description %{summary}. %prep %setup -q -n ghostty-%{version} %ifarch x86_64 ZIG_TARBALL=%{SOURCE1} ZIG_SHA256=%{zig_x86_64_sha256} %endif %ifarch aarch64 ZIG_TARBALL=%{SOURCE2} ZIG_SHA256=%{zig_aarch64_sha256} %endif echo "$ZIG_SHA256 $ZIG_TARBALL" | sha256sum -c - mkdir -p zig-toolchain tar -C zig-toolchain --strip-components=1 -xJf "$ZIG_TARBALL" zig-toolchain/zig version # Fetch every dependency, lazy ones included, into ./zig-pkg so %%build runs offline. # zig 0.17 keeps the global cache as archives that --system cannot read, so fetch-zig-cache.sh is not used. # deps.files.ghostty.org drops connections under load; completed packages persist in zig-pkg/, so retries only fetch the rest. for attempt in 1 2 3 4 5 6; do ZIG_GLOBAL_CACHE_DIR=$PWD/zig-deps zig-toolchain/zig build --fetch=all && break [ "$attempt" -eq 6 ] && exit 1 sleep $((attempt * 15)) done %build ZIG_BIN=$PWD/zig-toolchain/zig ZIG_GLOBAL_CACHE_DIR=$PWD/zig-deps ZIG_PKG_DIR=$PWD/zig-pkg if [ ! -d "$ZIG_PKG_DIR" ]; then echo "ERROR: Zig package directory not found at $ZIG_PKG_DIR; expected pre-fetched deps." exit 1 fi export ZIG_GLOBAL_CACHE_DIR mkdir -p %{_builddir}/ghostty-buildroot DESTDIR=%{_builddir}/ghostty-buildroot "$ZIG_BIN" build install \ --system "$ZIG_PKG_DIR" \ --summary all \ --prefix "%{_prefix}" \ -Dversion-string=%{version}-%{release} \ -Doptimize=ReleaseFast \ -Dcpu=baseline \ -Dpie=true \ -Demit-docs=false %install cp -a %{_builddir}/ghostty-buildroot/* %{buildroot}/ if [ ! -f "%{buildroot}%{ghostty_systemd_user_unitdir}/app-com.mitchellh.ghostty.service" ]; then echo "ERROR: Ghostty systemd user service file was not generated by zig build." exit 1 fi PKGCONFIG_SOURCE_FILE="$(find %{_builddir}/ghostty-buildroot -type f \ -path '*/pkgconfig/libghostty-vt.pc' | head -n 1)" if [ -z "$PKGCONFIG_SOURCE_FILE" ]; then echo "ERROR: Ghostty pkg-config metadata libghostty-vt.pc was not generated by zig build." echo "Searched in: */pkgconfig/libghostty-vt.pc" find %{_builddir}/ghostty-buildroot -type f -path '*/pkgconfig/*ghostty*' | head -n 20 || true exit 1 fi mkdir -p "%{buildroot}%{ghostty_pkgconfig_dir}" cp -a "$PKGCONFIG_SOURCE_FILE" "%{buildroot}%{ghostty_pkgconfig_dir}/libghostty-vt.pc" # Zig 0.17 writes the DESTDIR staging path into prefix= sed -i 's|^prefix=.*|prefix=%{_prefix}|' %{buildroot}%{ghostty_pkgconfig_dir}/libghostty-vt.pc # Zig stores archive members under .zig-cache/ paths, which brp-strip cannot handle; ship the shared library only. rm -f %{buildroot}%{ghostty_libdir}/libghostty-vt.a %{buildroot}%{ghostty_pkgconfig_dir}/libghostty-vt-static.pc %if 0%{?fedora} >= 42 rm -f "%{buildroot}%{_prefix}/share/terminfo/g/ghostty" %endif %files %license LICENSE %{_bindir}/ghostty %{_prefix}/share/applications/com.mitchellh.ghostty.desktop %{_prefix}/share/bash-completion/completions/ghostty.bash %{_prefix}/share/bat/syntaxes/ghostty.sublime-syntax %{_prefix}/share/fish/vendor_completions.d/ghostty.fish %{_prefix}/share/ghostty %{_prefix}/share/icons/hicolor/1024x1024/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/128x128/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/128x128@2/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/16x16/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/16x16@2/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/256x256@2/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/32x32/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/32x32@2/apps/com.mitchellh.ghostty.png %{_prefix}/share/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png %{_prefix}/share/kio/servicemenus/com.mitchellh.ghostty.desktop %{_prefix}/share/nautilus-python/extensions/ghostty.py %{_prefix}/share/nvim/site/compiler/ghostty.vim %{_prefix}/share/nvim/site/ftdetect/ghostty.vim %{_prefix}/share/nvim/site/ftplugin/ghostty.vim %{_prefix}/share/nvim/site/syntax/ghostty.vim %{_prefix}/share/vim/vimfiles/compiler/ghostty.vim %{_prefix}/share/vim/vimfiles/ftdetect/ghostty.vim %{_prefix}/share/vim/vimfiles/ftplugin/ghostty.vim %{_prefix}/share/vim/vimfiles/syntax/ghostty.vim %{_prefix}/share/zsh/site-functions/_ghostty %{_prefix}/share/dbus-1/services/com.mitchellh.ghostty.service %{_prefix}/share/locale/*/LC_MESSAGES/com.mitchellh.ghostty.mo %{_prefix}/share/metainfo/com.mitchellh.ghostty.metainfo.xml %{ghostty_systemd_user_unitdir}/app-com.mitchellh.ghostty.service %{ghostty_libdir}/libghostty-vt.so.0* %{_prefix}/share/terminfo/x/xterm-ghostty %if 0%{?fedora} < 42 %{_prefix}/share/terminfo/g/ghostty %endif %files devel # 1.4 adds many vt headers, so own the whole tree instead of listing them %{_includedir}/ghostty/ %{ghostty_libdir}/libghostty-vt.so %{ghostty_pkgconfig_dir}/libghostty-vt.pc %changelog * Wed Oct 28 2026 Purian23 - 1.4.0-2 - Build with a bundled official Zig 0.17.0 toolchain (1.4.0 needs zig >= 0.17) - Require GTK >= 4.18, libadwaita >= 1.7, gtk4-layer-shell >= 1.0.4 and system EGL - Drop EL 10 support: its GTK 4.16 and libadwaita 1.6 are too old for 1.4 * Tue Oct 27 2026 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 1.4.0-1 - update to 1.4.0 %autochangelog