- monsoon.spec: two subpackages (monsoon desktop, monsoon-server headless) with vendored deps, desktop/appstream validation, and systemd integration - data/monsoon-server.service: runs as dedicated monsoon user with StateDirectory/ConfigurationDirectory/CacheDirectory - dist.sh: generates source + vendored dependency tarballs for offline builds - .copr/Makefile: SCM integration for automated COPR builds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
126 lines
3.9 KiB
RPMSpec
126 lines
3.9 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: nodejs
|
|
BuildRequires: pnpm
|
|
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/grenade/vortex.git?branch=fix-double-panic"]
|
|
git = "https://github.com/grenade/vortex.git"
|
|
branch = "fix-double-panic"
|
|
replace-with = "vendored-sources"
|
|
|
|
[source.vendored-sources]
|
|
directory = "vendor"
|
|
EOF
|
|
|
|
%build
|
|
# Build web GUI for server
|
|
cd monsoon-web && pnpm install --offline && pnpm build && cd ..
|
|
|
|
# Build server binary
|
|
cargo build --release -p monsoon-server
|
|
|
|
# Build desktop frontend
|
|
pnpm install --offline
|
|
pnpm build
|
|
|
|
# Build desktop binary (reads frontend from dist/)
|
|
cargo build --release -p monsoon
|
|
|
|
%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
|