%define _binary_payload w2.xzdio %if "%{_host_cpu}" != "%{_target_cpu}" %global __strip /bin/true %endif Name: open-orpheus Version: 0.0.1 Release: 1%{?dist} Summary: An open-source Netease Cloud Music client License: MIT URL: https://github.com/YUCLing/open-orpheus Source0: open-orpheus-0.0.1.tar.gz Source1: open-orpheus-0.0.1-rpm-scaffolding.tar.gz Requires: gtk3, (libnotify or libnotify4), (nss or mozilla-nss), xdg-utils, at-spi2-core, libdrm, (mesa-libgbm or libgbm1), (libxcb or libxcb1), (kde-cli-tools or kde-cli-tools5 or kde-runtime or trash-cli or glib2 or gvfs-client) AutoReqProv: no %description An open-source Netease Cloud Music client %prep %setup -q %build # Install Rust toolchain for native modules curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . "$HOME/.cargo/env" rustup default stable # Install nvm and Node.js export HOME="$(mktemp -d)" curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash . "$HOME/.nvm/nvm.sh" nvm install 24 corepack enable pnpm corepack install # Install dependencies and build native modules pnpm install --frozen-lockfile pnpm run build:modules # Package the Electron app (no make, just package) pnpm run package %install # Install scaffolding (desktop file, icon, symlink, docs) mkdir -p %{buildroot} tar xf %{SOURCE1} -C %{buildroot} # Install the freshly-built Electron app mkdir -p %{buildroot}/usr/lib/%{name} cp -r %{_builddir}/%{name}-%{version}/out/%{name}-linux-*/. %{buildroot}/usr/lib/%{name}/ %files /usr/bin/open-orpheus /usr/lib/open-orpheus/ /usr/share/applications/open-orpheus.desktop /usr/share/doc/open-orpheus/ /usr/share/pixmaps/open-orpheus.png