diff --git a/anda/devs/ghostty/nightly/ghostty-nightly.spec b/anda/devs/ghostty/nightly/ghostty-nightly.spec index f250eacf00..7b8462240d 100644 --- a/anda/devs/ghostty/nightly/ghostty-nightly.spec +++ b/anda/devs/ghostty/nightly/ghostty-nightly.spec @@ -3,6 +3,7 @@ %global fulldate 2025-02-18 %global commit_date %(echo %{fulldate} | sed 's/-//g') %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV +%global base_ver 1.1.2 %global dev_ver 1.1.3 %if 0%{?fedora} <= 40 %global cache_dir %{_builddir}/zig-cache @@ -11,8 +12,11 @@ %endif Name: ghostty-nightly -Version: 1.1.2 -Release: 1%?dist +Version: %{base_ver}~tip^%{commit_date}git%{shortcommit} +Release: 2%{?dist} +%if 0%{?fedora} <= 41 +Epoch: 1 +%endif Summary: A fast, native terminal emulator written in Zig; this is the Tip (nightly) build. License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2.0 URL: https://ghostty.org/ @@ -36,13 +40,16 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(zlib) -Requires: %{name}-terminfo = %{version}-%{release} -Requires: %{name}-shell-integration = %{version}-%{release} +Requires: %{name}-terminfo +Requires: %{name}-shell-integration Requires: gtk4 Requires: libadwaita Conflicts: ghostty Provides: ghostty-tip = %{version}-%{release} -Obsoletes: %{name} <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name} = %{commit_date}.%{shortcommit} +%endif +Obsoletes: %{name} = 20250130.04d3636 Packager: ShinyGil %description @@ -50,10 +57,12 @@ Packager: ShinyGil %package bash-completion Summary: Ghostty Bash completion -Requires: %{name} = %{version}-%{release} +Requires: %{name} Requires: bash-completion Supplements: (%{name} and bash-completion) -Obsoletes: %{name}-bash-completion <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name}-bash-completion = %{commit_date}.%{shortcommit} +%endif BuildArch: noarch %description bash-completion @@ -61,10 +70,12 @@ Bash shell completion for Ghostty. %package fish-completion Summary: Ghostty Fish completion -Requires: %{name} = %{version}-%{release} +Requires: %{name} Requires: fish Supplements: (%{name} and fish) -Obsoletes: %{name}-fish-completion <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name}-fish-completion = %{commit_date}.%{shortcommit} +%endif BuildArch: noarch %description fish-completion @@ -72,10 +83,12 @@ Fish shell completion for Ghostty. %package zsh-completion Summary: Ghostty Zsh completion -Requires: %{name} = %{version}-%{release} +Requires: %{name} Requires: zsh Supplements: (%{name} and zsh) -Obsoletes: %{name}-zsh-completion <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name}-zsh-completion = %{commit_date}.%{shortcommit} +%endif BuildArch: noarch %description zsh-completion @@ -84,7 +97,9 @@ Zsh shell completion for Ghostty. %package shell-integration Summary: Ghostty shell integration Supplements: %{name} -Obsoletes: %{name}-shell-integration <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name}-shell-integration = %{commit_date}.%{shortcommit} +%endif BuildArch: noarch %description shell-integration @@ -93,7 +108,9 @@ This package contains files allowing Ghostty to integrate with various shells. %package terminfo Summary: Ghostty terminfo Supplements: %{name} -Obsoletes: %{name}-terminfo <= 20250130.04d3636-1%{?dist} +%if 0%{?fedora} <= 41 +Provides: %{name}-terminfo = %{commit_date}.%{shortcommit} +%endif BuildArch: noarch %description terminfo @@ -112,7 +129,6 @@ This package contains files for Ghostty's terminfo. Available for debugging use. /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} %autosetup -n ghostty-source -# Download everything ahead of time so we can enable system integration mode ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" ./nix/build-support/fetch-zig-cache.sh %build @@ -126,6 +142,7 @@ zig build \ --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" \ --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" \ --verbose \ + -Dversion-string="%{dev_ver}-dev+%{shortcommit}" \ -Dcpu=baseline \ -Dstrip=false \ -Dpie=true \ diff --git a/anda/devs/ghostty/nightly/update.rhai b/anda/devs/ghostty/nightly/update.rhai index 3261f0ef2d..b4ced68b77 100644 --- a/anda/devs/ghostty/nightly/update.rhai +++ b/anda/devs/ghostty/nightly/update.rhai @@ -7,7 +7,7 @@ if rpm.changed() { date.truncate(10); let html = get(`https://raw.githubusercontent.com/ghostty-org/ghostty/refs/heads/main/build.zig.zon`); let ver = find(".version = \"([\\d.]+)\"", html, 1); - rpm.version(gh_tag("ghostty-org/ghostty")); + rpm.global("base_ver", gh_tag("ghostty-org/ghostty")); rpm.global("fulldate", date); rpm.global("dev_ver", ver) } diff --git a/anda/devs/ghostty/stable/ghostty.spec b/anda/devs/ghostty/stable/ghostty.spec index 0ed44e5921..ea25ae6186 100644 --- a/anda/devs/ghostty/stable/ghostty.spec +++ b/anda/devs/ghostty/stable/ghostty.spec @@ -8,7 +8,7 @@ Name: ghostty Version: 1.1.2 -Release: 1%?dist +Release: 2%?dist Summary: A fast, native terminal emulator written in Zig. License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2.0 URL: https://ghostty.org/ @@ -99,10 +99,12 @@ Source files for Ghostty's terminfo. Available for debugging use. %prep /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -%autosetup -p1 +%autosetup -# Download everything ahead of time so we can enable system integration mode -ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" ./nix/build-support/fetch-zig-cache.sh +export ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" +zig build --fetch +zig fetch git+https://github.com/zigimg/zigimg#3a667bdb3d7f0955a5a51c8468eac83210c1439e +zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b %build @@ -131,7 +133,7 @@ zig build \ %_datadir/bat/syntaxes/ghostty.sublime-syntax %_datadir/ghostty/ %_datadir/kio/servicemenus/com.mitchellh.ghostty.desktop -%_datadir/nautilus-python/extensions/com.mitchellh.ghostty.py +%_datadir/nautilus-python/extensions/ghostty.py %_datadir/nvim/site/compiler/ghostty.vim %_datadir/nvim/site/ftdetect/ghostty.vim %_datadir/nvim/site/ftplugin/ghostty.vim