# -*- mode: spec; package-name: ghostty; version: 0; -*- # Ghostty - A fast, GPU-accelerated terminal emulator # Unified spec file for Fedora and openSUSE Tumbleweed tip builds Name: ghostty Version: 1.3.2^202609010208.g8168115 %if 0%{?suse_version} Release: 1 %else Release: 1%{?dist} %endif 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 # Common dependenciess BuildRequires: zig # Distribution-specific %if 0%{?suse_version} BuildRequires: pkgconfig BuildRequires: pkgconfig(gtk4) BuildRequires: pkgconfig(gtk4-layer-shell-0) BuildRequires: pkgconfig(libadwaita-1) BuildRequires: pkgconfig(oniguruma) BuildRequires: gettext-tools BuildRequires: pandoc %else BuildRequires: gtk4-devel BuildRequires: gtk4-layer-shell-devel BuildRequires: libadwaita-devel BuildRequires: oniguruma-devel BuildRequires: pkg-config BuildRequires: gettext BuildRequires: pandoc-cli %endif %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 %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. DESTDIR="%{buildroot}" \ zig build \ --summary all \ --prefix "%{_prefix}" \ --system "$ZIG_GLOBAL_CACHE_DIR/p" \ -Dversion-string="1.3.2+8168115" \ -Doptimize=ReleaseFast \ -Dcpu=baseline \ -Dpie=true \ -Demit-docs %if 0%{?fedora} >= 42 rm -rf "%{buildroot}%{_datadir}/terminfo" %endif rm -f "%{buildroot}%{_libdir}/libghostty"* "%{buildroot}/usr/lib/libghostty"* # Collect installed file paths find "%{buildroot}" -type f \ ! -path "%{buildroot}%{_datadir}/ghostty/*" | sed 's,^%{buildroot},,' > files %files -f files %license LICENSE %{_datadir}/ghostty %changelog * Tue Sep 01 2026 Boyd Kelly - 1.3.2^202609010208.g8168115-1 - Unified tip build from ghostty-source.tar.gz