Marvin Friedrich
f24bf46ef7
* v0.164.x stable * Fix panic in update_ime_position (cherry-pick #21510) (#21512) * Fix panic in update_ime_position (#21510) * vim: Add == and fix = in the status bar (#21490) * Bump to 0.164.2 for @ConradIrwin * Add AutoIndent action and '=' vim operator (#21427) * Fix panic in autoclosing (#21482) * Fix ctrl-alt-X shortcuts (cherry-pick #21473) (#21474) * Revert "macos: Add default keybind for ctrl-home / ctrl-end (#21007)" * Properly handle opening of file-less excerpts (cherry-pick #21465) (#21472) * Fix macOS IME overlay positioning (#21416) * Fix dismissing the IME viewer with escape (#21413) * Bump to 0.164.1 for @osiewicz * workspace: Sanitize pinned tab count before usage (cherry-pick #21417) (#21423) * toolchains: Run listing tasks on background thread (cherry-pick #21414) (#21420) * Make Markdown images layout vertically instead of horizontally (#21247) * v0.164.x preview * docs: Move install rustup callup to top of developing-extensions.md (#21239) * Use eslint from the fork (#21233) * Fix cmd-shift-e (reveal in project panel) to match vscode (#21228) * Add ctrl-w _ and ctrl-w = (#21227) * Add support for resizing panes using vim motions (#21038) * Fix file missing or duplicated when copying multiple items in project panel + Fix marked files not being deselected after selecting a directory (#20859) * vim: Add "unmatched" motions `]}`, `])`, `[{` and `[(` (#21098) * vim: Add indent text object (#21121) * Revert "Styling for Apply/Discard buttons (#21017)" * docs: Fix default value for `relative_line_numbers` in vim (#21196) * Styling for Apply/Discard buttons (#21017) * assistant2: Add a checkbox to control tool use (#21215) OBS-URL: https://build.opensuse.org/package/show/editors/zed?expand=0&rev=43
127 lines
4.0 KiB
RPMSpec
127 lines
4.0 KiB
RPMSpec
#
|
|
# spec file for package zed
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
# Copyright (c) 2024 Marvin Friedrich
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1550
|
|
%global force_gcc_version 13
|
|
%endif
|
|
|
|
# mold is not on Leap yet
|
|
%if 0%{?suse_version} > 1600
|
|
%bcond_without mold
|
|
%else
|
|
%bcond_with mold
|
|
%endif
|
|
|
|
%if %{with mold}
|
|
%global build_rustflags "-C" "linker=clang" "-C" "link-arg='-fuse-ld=/usr/bin/mold -Wl,-z,relro,-z,now'" "-C" "debuginfo=2" "-C" "incremental=false" "-C" "strip=none"
|
|
%endif
|
|
|
|
Name: zed
|
|
Version: 0.164.2
|
|
Release: 0
|
|
Summary: A high-performance, multiplayer code editor
|
|
License: AGPL-3.0-or-later AND Apache-2.0 AND GPL-3.0-only
|
|
Group: Development/Tools/IDE
|
|
URL: https://github.com/zed-industries/zed
|
|
Source0: %{name}-%{version}.tar.zst
|
|
Source1: vendor.tar.zst
|
|
BuildRequires: cargo >= 1.80
|
|
BuildRequires: cargo-packaging
|
|
BuildRequires: cmake
|
|
BuildRequires: gcc%{?force_gcc_version}-c++
|
|
BuildRequires: git
|
|
BuildRequires: hicolor-icon-theme
|
|
|
|
%if %{with mold}
|
|
BuildRequires: clang
|
|
BuildRequires: mold
|
|
%endif
|
|
|
|
# all pkgconfig BR are based on the the build.rs files in the vendor tree
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(egl)
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
BuildRequires: pkgconfig(freetype2) >= 18.5.12
|
|
BuildRequires: pkgconfig(libcurl)
|
|
BuildRequires: pkgconfig(libgit2)
|
|
BuildRequires: pkgconfig(libzstd)
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
BuildRequires: pkgconfig(wayland-client)
|
|
BuildRequires: pkgconfig(wayland-cursor)
|
|
BuildRequires: pkgconfig(wayland-egl)
|
|
BuildRequires: pkgconfig(wayland-server)
|
|
BuildRequires: pkgconfig(zlib)
|
|
# it doesnt try to find this one but then it tries to link to it.
|
|
BuildRequires: pkgconfig(xkbcommon)
|
|
BuildRequires: pkgconfig(xkbcommon-x11)
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
# otherwise it downloads a copy of nodejs
|
|
Requires: npm
|
|
|
|
%description
|
|
Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
|
|
|
|
%prep
|
|
# Vendored sources
|
|
%autosetup -p1 -a1
|
|
|
|
%build
|
|
%if 0%{?force_gcc_version}
|
|
export CC="gcc-%{?force_gcc_version}"
|
|
export CXX="g++-%{?force_gcc_version}"
|
|
%endif
|
|
|
|
export ZED_UPDATE_EXPLANATION="Please use the package manager to update zed."
|
|
# Build CLI
|
|
cd crates/cli/
|
|
%{cargo_build}
|
|
# Build Editor
|
|
cd ../zed/
|
|
%{cargo_build}
|
|
|
|
%install
|
|
install -D -d -m 0755 %{buildroot}%{_bindir}
|
|
install -D -d -m 0755 %{buildroot}%{_libexecdir}
|
|
|
|
# https://github.com/zed-industries/zed/blob/main/script/bundle-linux#L63
|
|
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/zed %{buildroot}%{_libexecdir}/zed-editor
|
|
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/cli %{buildroot}%{_bindir}/zed
|
|
|
|
# Desktop file
|
|
# https://github.com/zed-industries/zed/blob/main/script/bundle-linux#L85
|
|
export DO_STARTUP_NOTIFY="true"
|
|
export APP_CLI="zed"
|
|
export APP_ICON="zed"
|
|
export APP_NAME="Zed"
|
|
envsubst < "crates/zed/resources/zed.desktop.in" > "crates/zed/resources/zed.desktop"
|
|
install -Dm 0644 crates/zed/resources/zed.desktop %{buildroot}%{_datadir}/applications/zed.desktop
|
|
install -Dm 0644 assets/icons/logo_96.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/zed.svg
|
|
|
|
%files
|
|
%license LICENSE-*
|
|
%doc README.md
|
|
%{_bindir}/zed
|
|
%{_libexecdir}/zed-editor
|
|
%{_datadir}/applications/zed.desktop
|
|
%{_datadir}/icons/hicolor/scalable/apps/zed.svg
|
|
|
|
%changelog
|