%define _debugsource_template %{nil} %define debug_package %{nil} %bcond_with vendored Name: zed Version: 1.1.6 Release: 3%{?dist} Summary: High-performance, multiplayer code editor from the creators of Atom and Tree-sitter License: AGPL-3.0-or-later AND Apache-2.0 AND GPL-3.0-or-later URL: https://github.com/zed-industries/zed Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %if %{with vendored} Source1: %{name}-%{version}-vendor.tar.zst %endif # Rust edition 2024 requires 1.85+. Zed toolchain is 1.95. BuildRequires: cargo >= 1.85 BuildRequires: rust >= 1.85 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang BuildRequires: cmake BuildRequires: gettext BuildRequires: jq BuildRequires: llvm BuildRequires: make BuildRequires: pkgconf-pkg-config BuildRequires: desktop-file-utils BuildRequires: systemd-rpm-macros # System C library devel packages for Rust FFI crate linkage BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: glib2-devel BuildRequires: libva-devel BuildRequires: libxcb-devel BuildRequires: libxkbcommon-x11-devel BuildRequires: libzstd-devel BuildRequires: openssl-devel BuildRequires: sqlite-devel BuildRequires: wayland-devel BuildRequires: vulkan-loader BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd BuildRequires: perl-File-Compare BuildRequires: perl-File-Copy %description Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. It blends the power of an IDE with the speed of a lightweight editor, featuring GPU-accelerated rendering, LSP integration, and real-time collaboration. %prep %autosetup -n %{name}-%{version} rm -f rust-toolchain.toml %if %{with vendored} tar -xaf %{SOURCE1} test -f .cargo/config.toml %endif %build export CARGO_HOME=$PWD/.cargo-home export CC=clang export RUSTFLAGS="%{?build_rustflags} -Cdebuginfo=line-tables-only" %if %{with vendored} export CARGO_NET_OFFLINE=true cargo build --release --frozen --offline \ --package zed --package cli %else cargo build --release --locked --package zed --package cli %endif %install CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-target}" # Main editor binary under libexec install -Dpm 0755 $CARGO_TARGET_DIR/release/zed \ %{buildroot}%{_libexecdir}/zed-editor # CLI launcher install -Dpm 0755 $CARGO_TARGET_DIR/release/cli \ %{buildroot}%{_bindir}/zed # Desktop file mkdir -p %{buildroot}%{_datadir}/applications export APP_NAME="Zed" export APP_CLI="zed" export APP_ICON="zed" export APP_ARGS="%%U" export DO_STARTUP_NOTIFY="true" envsubst < crates/zed/resources/zed.desktop.in \ > %{buildroot}%{_datadir}/applications/dev.zed.Zed.desktop chmod 0755 %{buildroot}%{_datadir}/applications/dev.zed.Zed.desktop # App icons for res in 512 1024; do src="crates/zed/resources/app-icon.png" if [ "$res" = "1024" ]; then src="crates/zed/resources/app-icon@2x.png" fi install -Dpm 0644 "$src" \ %{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps/zed.png done # Metainfo (appstream) export APP_ID="dev.zed.Zed" export APP_NAME="Zed" export BRANDING_LIGHT="#ffc83d" export BRANDING_DARK="#ffc83d" mkdir -p %{buildroot}%{_metainfodir} sed '/@release_info@/d' < crates/zed/resources/flatpak/zed.metainfo.xml.in | \ envsubst > %{buildroot}%{_metainfodir}/dev.zed.Zed.metainfo.xml # Licenses install -Dpm 0644 LICENSE-AGPL %{buildroot}%{_licensedir}/%{name}/LICENSE-AGPL install -Dpm 0644 LICENSE-APACHE %{buildroot}%{_licensedir}/%{name}/LICENSE-APACHE install -Dpm 0644 LICENSE-GPL %{buildroot}%{_licensedir}/%{name}/LICENSE-GPL %check desktop-file-validate %{buildroot}%{_datadir}/applications/dev.zed.Zed.desktop %{buildroot}%{_libexecdir}/zed-editor --version %files %license %{_licensedir}/%{name}/ %doc README.md %{_bindir}/zed %{_libexecdir}/zed-editor %{_datadir}/applications/dev.zed.Zed.desktop %{_metainfodir}/dev.zed.Zed.metainfo.xml %{_datadir}/icons/hicolor/512x512/apps/zed.png %{_datadir}/icons/hicolor/1024x1024/apps/zed.png %changelog * Fri May 08 2026 sachesi - 1.1.6-3 - Fix %install: mkdir before envsubst redirect (dir didn't exist) - Fix changelog date (Thu→Fri) * Thu May 08 2026 sachesi - 1.1.6-2 - Reduce debuginfo to line-tables-only to speed up compile - Bump Copr timeout to 64800s and memory to 4096MB (set in Copr web UI) * Thu May 07 2026 sachesi - 1.1.6-1 - Initial COPR package for Zed editor v1.1.6 - Vendored Cargo dependencies for offline COPR/mock builds