%global zig 0.15.2 # The release build has no debug info, so there is nothing for a debuginfo package %global debug_package %{nil} # Zig-built binaries are fine as they are %global __strip /bin/true Name: ghostty Version: 1.3.1 Release: 1%{?dist} Summary: Fast, feature-rich, GPU-accelerated terminal emulator License: MIT URL: https://ghostty.org # EL10 harfbuzz is too old for ghostty (no HB_BUFFER_CLUSTER_LEVEL_GRAPHEMES). Its headers leak in through the system freetype and fontconfig pkg-config files, so build those bundled too # Release tarball, the Zig compiler it requires (EPEL 10 only has 0.16) and its Zig dependencies, from fetch-source.sh Source0: ghostty-%{version}.tar.gz Source1: zig-x86_64-linux-%{zig}.tar.xz Source2: ghostty-zig-cache-%{version}.tar.xz ExclusiveArch: x86_64 BuildRequires: blueprint-compiler BuildRequires: bzip2-devel BuildRequires: expat-devel BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: gcc BuildRequires: gettext BuildRequires: glib2-devel BuildRequires: gtk4-devel BuildRequires: gcc-c++ BuildRequires: libadwaita-devel BuildRequires: libpng-devel BuildRequires: libxml2 BuildRequires: ncurses BuildRequires: oniguruma-devel BuildRequires: pandoc BuildRequires: pkgconfig BuildRequires: wayland-devel BuildRequires: zlib-devel Requires: gtk4 Requires: libadwaita %description Ghostty is a terminal emulator with native GTK4 and libadwaita UI, GPU rendering and a focus on speed and features. This build is Wayland only. %prep %autosetup -n ghostty-%{version} tar -xf %{SOURCE1} -C %{_builddir} mkdir -p %{_builddir}/zig-cache tar -xf %{SOURCE2} -C %{_builddir}/zig-cache %build # zig build installs as part of the build, so stage into a directory and copy it in the install section export ZIG_GLOBAL_CACHE_DIR=%{_builddir}/zig-global DESTDIR=$PWD/dest %{_builddir}/zig-x86_64-linux-%{zig}/zig build \ --prefix %{_prefix} \ --system %{_builddir}/zig-cache/p \ -fno-sys=gtk4-layer-shell \ -fno-sys=harfbuzz -fno-sys=freetype -fno-sys=fontconfig \ -Doptimize=ReleaseFast \ -Dcpu=baseline \ -Dgtk-x11=false \ -Dversion-string=%{version} %install cp -a dest/. %{buildroot}/ %files %license LICENSE %{_bindir}/ghostty %{_datadir}/* %changelog %autochangelog