%bcond check 1 Name: sendxmpp-rs Version: 3.0.1 Release: 1%{?dist} Summary: Send XMPP messages from the command line (the sendmail of XMPP) # Cumulative SPDX over sendxmpp and every statically-linked crate # (%%cargo_license_summary). The binary itself is AGPL-3.0-or-later. License: AGPL-3.0-or-later AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND ISC AND LGPL-3.0+ AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND MPL-2.0 AND MPL-2.0+ AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) URL: https://github.com/moparisthebest/sendxmpp-rs Source0: %{url}/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.xz # Hand-written: upstream's gumdrop CLI has no completion generator. Source2: _sendxmpp # The shipped binary is /usr/bin/sendxmpp, the same name as the Perl sendxmpp. Provides: sendxmpp = %{version}-%{release} ExclusiveArch: %{rust_arches} BuildRequires: cargo-rpm-macros >= 24 # Vendoring turns off %%cargo_generate_buildrequires; ring compiles C glue and # assembles its pregenerated asm via cc, so add the C toolchain by hand. BuildRequires: gcc %description sendxmpp is the XMPP equivalent of sendmail: it sends a message read from stdin to one or more recipients. Credentials are read from a TOML config (~/.config/sendxmpp.toml, falling back to /etc/sendxmpp/sendxmpp.toml). It supports multi-user chats, raw XML streams, and optional OpenPGP encryption. %prep %autosetup -n %{name}-%{version} -p1 tar -xJf %{SOURCE1} %cargo_prep -v vendor %build %cargo_build %{cargo_vendor_manifest} %install install -Dpm0755 target/rpm/sendxmpp %{buildroot}%{_bindir}/sendxmpp install -Dpm0644 %{SOURCE2} %{buildroot}%{zsh_completions_dir}/_sendxmpp %check %if %{with check} # gumdrop exposes no --version, and --help is emitted via die!(...) which exits # non-zero, so assert the usage banner rather than a zero exit. %{buildroot}%{_bindir}/sendxmpp --help 2>&1 | grep -q '^Usage: ' %endif %files %license LICENSE.md %license cargo-vendor.txt %doc README.md %doc sendxmpp.toml %{_bindir}/sendxmpp %{zsh_completions_dir}/_sendxmpp %changelog * Tue Jun 30 2026 Bahtiar `kalkin-` Gadimov - 3.0.1-1 - Initial package