fix(ghostty-nightly): File name change and conditional epoch (#3306) (#3454)

* Update ghostty-nightly.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Recreate the old script for now

Signed-off-by: Gilver <rockgrub@disroot.org>

* Hmm

Signed-off-by: Gilver <rockgrub@disroot.org>

* Hhhhh

Signed-off-by: Gilver <rockgrub@disroot.org>

* Trying again

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update ghostty-nightly.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update ghostty-nightly.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Add fix to stable

Signed-off-by: Gilver <rockgrub@disroot.org>

* No more patch so that did not need to be there

Signed-off-by: Gilver <rockgrub@disroot.org>

* Old method should (hopefully) work now

Signed-off-by: Gilver <rockgrub@disroot.org>

* Switch back here too?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update ghostty.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Oops

Signed-off-by: Gilver <rockgrub@disroot.org>

* Oops again

Signed-off-by: Gilver <rockgrub@disroot.org>

* WE ARE SO BACK

Signed-off-by: Gilver <rockgrub@disroot.org>

* Testing

Signed-off-by: Gilver <rockgrub@disroot.org>

* Bump epoch ifcond

Signed-off-by: Gilver <rockgrub@disroot.org>

* Spec hacks to iron out remaining upgrade kinks

* Change to global macro

Signed-off-by: Gilver <rockgrub@disroot.org>

* The dev ver is used for the internal version string so winning?

The Git commit is however missing in the internal version because it only exists if built from master so yay I fixed that.

Signed-off-by: Gilver <rockgrub@disroot.org>

* Bump this down just in case

Signed-off-by: Gilver <rockgrub@disroot.org>

* Now where did that vanish to?

Signed-off-by: Gilver <rockgrub@disroot.org>

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
(cherry picked from commit c1e6365d46)

Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Raboneko
2025-02-19 19:59:07 -08:00
committed by GitHub
parent 6a27d6a487
commit be1fd0ec7f
3 changed files with 39 additions and 20 deletions
+31 -14
View File
@@ -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 <rockgrub@disroot.org>
%description
@@ -50,10 +57,12 @@ Packager: ShinyGil <rockgrub@disroot.org>
%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 \
+1 -1
View File
@@ -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)
}
+7 -5
View File
@@ -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