Files
monsoon/monsoon.spec
rob thijssen e480ea4ea6
All checks were successful
CI / Format, lint, build, test (push) Successful in 6m1s
CI / Build SRPM (push) Successful in 1m38s
CI / Publish to COPR (push) Successful in 25m1s
fix: switch vortex dependency from fork to upstream
Replace grenade/vortex fork (fix-double-panic branch) with upstream
Nehliin/vortex pinned to rev fbb3da44, which includes PR #129 expanding
piece request validation to prevent the double-panic at its root cause.

Also suppress a11y_click_events_have_key_events warning on the overlay
div in AddTorrent.svelte (keyboard dismiss already handled via
svelte:window keydown).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 18:41:23 +03:00

122 lines
4.1 KiB
RPMSpec

Name: monsoon
Version: 0.1.0
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.git?rev=fbb3da4446eaca6ab52f092afbf8566445713b4b"]
git = "https://github.com/Nehliin/vortex.git"
rev = "fbb3da4446eaca6ab52f092afbf8566445713b4b"
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 <grenade@rob.tn> - 0.1.0-1
- Initial package