# Electron payload: stripping corrupts the embedded snapshot; rpm 6 also # fails on the empty debugsource list — see AGENTS.md %define debug_package %{nil} %global __strip /bin/true # Bundled Electron must not leak into rpm provides/requires %global __provides_exclude_from ^%{_libdir}/opencode-desktop/.*$ %global __requires_exclude_from ^%{_libdir}/opencode-desktop/.*$ ExclusiveArch: x86_64 aarch64 Name: opencode-desktop Version: 1.19.3 Release: 1%{?dist} Summary: Desktop app for OpenCode, the open source AI coding agent (Electron) License: MIT URL: https://opencode.ai Source0: https://github.com/anomalyco/opencode/releases/download/v%{version}/opencode-desktop-linux-x86_64.rpm Source1: https://github.com/anomalyco/opencode/releases/download/v%{version}/opencode-desktop-linux-aarch64.rpm Source2: https://raw.githubusercontent.com/anomalyco/opencode/v%{version}/LICENSE BuildRequires: bsdtar BuildRequires: desktop-file-utils Requires: gtk3 Requires: nss Requires: libsecret Requires: alsa-lib Requires: libXScrnSaver Recommends: opencode %description Official desktop application (beta) for OpenCode, the open source AI coding agent. Bundles its own Electron runtime. %prep %setup -T -q -c %ifarch x86_64 bsdtar -xf %{SOURCE0} %else bsdtar -xf %{SOURCE1} %endif %build %install appdir=%{buildroot}%{_libdir}/opencode-desktop install -d "$appdir" cp -a opt/OpenCode/. "$appdir"/ rm -f "$appdir"/resources/app-update.yml install -d %{buildroot}%{_bindir} cat > %{buildroot}%{_bindir}/opencode-desktop < - 1.19.3-1 - Initial package