Name: monsoon Version: 0.2.8 Release: 1%{?dist} Summary: A fast BitTorrent client powered by io-uring License: GPL-3.0-or-later URL: https://git.lair.cafe/monsoon/monsoon Source0: %{name}-%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.gz ExclusiveArch: x86_64 BuildRequires: rust >= 1.85 BuildRequires: cargo BuildRequires: gcc BuildRequires: webkit2gtk4.1-devel BuildRequires: gtk3-devel BuildRequires: libsoup3-devel BuildRequires: pango-devel BuildRequires: gdk-pixbuf2-devel BuildRequires: glib2-devel BuildRequires: libappindicator-gtk3-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: systemd-rpm-macros %description Monsoon is a modern BitTorrent client for the GNOME desktop, built on the high-performance Vortex bittorrent engine which uses Linux io-uring for efficient I/O. It supports magnet links, DHT peer discovery, and simultaneous multi-torrent management. %package server Summary: Monsoon headless BitTorrent server with REST API Requires(pre): shadow-utils %description server Headless BitTorrent daemon with REST API, WebSocket event streaming, and web GUI for remote torrent management. Designed for deployment on LAN servers to offload torrent downloading with completion notifications for post-download automation. %prep %autosetup tar xf %{SOURCE1} mkdir -p .cargo cat > .cargo/config.toml << 'EOF' [source.crates-io] replace-with = "vendored-sources" [source."git+https://github.com/Nehliin/vortex?rev=3b1cb7eb32afb388cd72a0fc6c75e1022a279274"] git = "https://github.com/Nehliin/vortex" rev = "3b1cb7eb32afb388cd72a0fc6c75e1022a279274" replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" EOF %build # Prevent brp-mangle-shebangs from misinterpreting Rust #![...] attributes # in vendored sources as shebangs %global __brp_mangle_shebangs_exclude_from /usr/src/debug # Frontends are pre-built and included in the source tarball # (dist/ for desktop, monsoon-web/dist/ for server web GUI) # custom-protocol feature tells Tauri to embed frontend assets into the # binary. Without it, the app expects a local Vite dev server at :5173. cargo build --release -p monsoon --features custom-protocol cargo build --release -p monsoon-server %install # Desktop app install -Dm755 target/release/monsoon %{buildroot}%{_bindir}/monsoon install -Dm644 data/cafe.lair.monsoon.desktop %{buildroot}%{_datadir}/applications/cafe.lair.monsoon.desktop install -Dm644 data/cafe.lair.monsoon.metainfo.xml %{buildroot}%{_metainfodir}/cafe.lair.monsoon.metainfo.xml install -Dm644 src-tauri/icons/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/cafe.lair.monsoon.png install -Dm644 src-tauri/icons/128x128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/cafe.lair.monsoon.png install -Dm644 src-tauri/icons/32x32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/cafe.lair.monsoon.png # Server install -Dm755 target/release/monsoon-server %{buildroot}%{_bindir}/monsoon-server install -Dm644 data/monsoon-server.service %{buildroot}%{_unitdir}/monsoon-server.service install -dm755 %{buildroot}%{_datadir}/monsoon/web cp -r monsoon-web/dist/* %{buildroot}%{_datadir}/monsoon/web/ %check desktop-file-validate %{buildroot}%{_datadir}/applications/cafe.lair.monsoon.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/cafe.lair.monsoon.metainfo.xml %pre server getent group monsoon >/dev/null || groupadd -r monsoon getent passwd monsoon >/dev/null || useradd -r -g monsoon -d /var/lib/monsoon -s /sbin/nologin monsoon %post server %systemd_post monsoon-server.service %preun server %systemd_preun monsoon-server.service %postun server %systemd_postun_with_restart monsoon-server.service %files %license LICENSE %doc README.md %{_bindir}/monsoon %{_datadir}/applications/cafe.lair.monsoon.desktop %{_metainfodir}/cafe.lair.monsoon.metainfo.xml %{_datadir}/icons/hicolor/*/apps/cafe.lair.monsoon.png %files server %license LICENSE %doc README.md %{_bindir}/monsoon-server %{_unitdir}/monsoon-server.service %{_datadir}/monsoon/ %changelog * Sun Apr 05 2026 Rob Thijssen - 0.1.0-1 - Initial package