Name: ghostty Version: 1.2.3 Release: 1%{?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://github.com/ghostty-org/ghostty/archive/refs/tags/v%{version}.tar.gz Source1: https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz Source2: https://ziglang.org/download/0.14.0/zig-linux-aarch64-0.14.0.tar.xz ExclusiveArch: x86_64 aarch64 BuildRequires: blueprint-compiler BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: glib2-devel BuildRequires: gtk4-devel BuildRequires: gtk4-layer-shell-devel BuildRequires: harfbuzz-devel BuildRequires: libadwaita-devel BuildRequires: libpng-devel BuildRequires: oniguruma-devel BuildRequires: pandoc-cli BuildRequires: pixman-devel BuildRequires: pkg-config BuildRequires: wayland-protocols-devel BuildRequires: zlib-ng-devel Requires: fontconfig Requires: freetype Requires: glib2 Requires: gtk4 Requires: harfbuzz Requires: libadwaita Requires: libpng Requires: oniguruma Requires: pixman Requires: zlib-ng %description %{summary}. %prep %setup -q -n ghostty-%{version} sed -i \ -e 's|https://github.com/mbadolato/iTerm2-Color-Schemes/releases/download/[^"]*/ghostty-themes.tgz|https://deps.files.ghostty.org/ghostty-themes-release-20251201-150531-bfb3ee1.tgz|g' \ -e 's|N-V-__8AALIsAwDyo88G5mGJGN2lSVmmFMx4YePfUvp_2o3Y|N-V-__8AANFEAwCzzNzNs3Gaq8pzGNl2BbeyFBwTyO5iZJL-|g' \ build.zig.zon # Unpack vendored Zig into %{_builddir}/zig-toolchain if present in SRPM. # The tarballs contain a single top-level directory, e.g. zig-linux-x86_64-0.14.0/ rm -rf %{_builddir}/zig-toolchain mkdir -p %{_builddir}/zig-toolchain %ifarch x86_64 if [ -f "%{SOURCE1}" ]; then tar -xJf "%{SOURCE1}" -C %{_builddir}/zig-toolchain fi %endif %ifarch aarch64 if [ -f "%{SOURCE2}" ]; then tar -xJf "%{SOURCE2}" -C %{_builddir}/zig-toolchain fi %endif %build set -x # Find an executable zig in the vendored toolchain (absolute path) ZIG_VENDOR_BIN="" for d in %{_builddir}/zig-toolchain/* ; do if [ -x "$d/zig" ]; then ZIG_VENDOR_BIN="$d/zig" break fi done # Diagnostics echo "Contents of %{_builddir}/zig-toolchain:" ls -la %{_builddir}/zig-toolchain || true if [ -n "$ZIG_VENDOR_BIN" ]; then echo "Using vendored zig at: $ZIG_VENDOR_BIN" "$ZIG_VENDOR_BIN" version || true # Use the absolute path to the binary (no ambiguity) DESTDIR=%{buildroot} "$ZIG_VENDOR_BIN" build \ --summary all \ --prefix "%{_prefix}" \ -Dversion-string=%{version}-%{release} \ -Doptimize=ReleaseSmall \ -Dcpu=baseline \ -Dpie=true \ -Dstrip=true else echo "Vendored zig not found, falling back to system 'zig' (may be incompatible)" zig --version || true DESTDIR=%{buildroot} zig build \ --summary all \ --prefix "%{_prefix}" \ -Dversion-string=%{version}-%{release} \ -Doptimize=ReleaseSmall \ -Dcpu=baseline \ -Dpie=true \ -Dstrip=true fi %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/man/man1/ghostty.1 %{_prefix}/share/man/man5/ghostty.5 %{_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 %{_prefix}/share/systemd/user/app-com.mitchellh.ghostty.service %{_prefix}/share/terminfo/x/xterm-ghostty %if 0%{?fedora} < 42 %{_prefix}/share/terminfo/g/ghostty %endif %changelog %autochangelog