# -*- mode: spec; package-name: ghostty; version: 0; -*- # Ghostty - A fast, GPU-accelerated terminal emulator # Fedora spec file for tip (development) build # # This spec intentionally keeps dependencies minimal while following # the version conventions and changelog macros used by the official # ghostty.spec.rpkg. Name: ghostty Version: 1.3.2^main.e660500 Release: 1%{?dist} Summary: Fast terminal emulator using modern graphics APIs License: BSD-2-Clause URL: https://github.com/ghostty-org/ghostty Source0: https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz # Minimal set of build dependencies for a tip build BuildRequires: gtk4-devel BuildRequires: gtk4-layer-shell-devel BuildRequires: libadwaita-devel BuildRequires: oniguruma-devel BuildRequires: pkg-config BuildRequires: gettext BuildRequires: pandoc-cli BuildRequires: zig # The global definitions align with rpmmacros used by the upstream %global _product_license BSD-2-Clause %global _product_url %{url} %global _product_source0 %{Source0} %description Ghostty is a fast, cross‑platform terminal emulator that leverages GPU‑accelerated graphics through GTK4 and libadwaita. This spec builds the latest development tip from the official GitHub releases. %prep # The tip tarball unpacks into a versioned top directory # (e.g. ghostty-1.3.2-main-+7f62fe7/); strip that component so we # don't depend on the exact name, which changes every commit. %setup -q -c -T tar -xzf %{SOURCE0} --strip-components=1 %build export ZIG_GLOBAL_CACHE_DIR="$PWD/.zig-offline-cache" echo "https://deps.files.ghostty.org/uucode-2826a37a4562284fdacd8fa029d49509cc9bffcd.tar.gz" >> build.zig.zon.txt ./nix/build-support/fetch-zig-cache.sh # Unpack downloaded archives into directories required by zig build --system for archive in "$ZIG_GLOBAL_CACHE_DIR/p"/*.tar.gz; do [ -f "$archive" ] || continue target_dir="${archive%.tar.gz}" if [ ! -d "$target_dir" ]; then mkdir -p "$target_dir" tar -xzf "$archive" -C "$target_dir" --strip-components=1 fi done # Ghostty's Zig build performs compilation and installation together. # Stage the result into the RPM buildroot. v="%{version}-%{release}" v="${v/^/+}" # 1.3.2^9ae02a3 -> 1.3.2+9ae02a3 (real literal caret, not tilde-expansion) DESTDIR="%{buildroot}" \ zig build \ --summary all \ --prefix "%{_prefix}" \ --system "$ZIG_GLOBAL_CACHE_DIR/p" \ -Dversion-string="$v" \ -Doptimize=ReleaseFast \ -Dcpu=baseline \ -Dpie=true \ -Demit-docs # zig build installs everything into %{buildroot} via DESTDIR %if 0%{?fedora} >= 42 rm -rf "%{buildroot}%{_datadir}/terminfo" %endif # Remove libghostty which doesn't pertain yet. rm -f "%{buildroot}/usr/lib/libghostty"* # Find the files because manually listing them is boring. find "%{buildroot}" -type f \ ! -path "%{buildroot}%{_datadir}/ghostty/*" | sed 's,^%{buildroot},,' > files %files -f files %license LICENSE %{_datadir}/ghostty %changelog * Thu Aug 20 2026 Boyd Kelly - 1.3.2^main.e660500-1 - Nightly tip build from ghostty-source.tar.gz (GitHub tip release)