File rtl-sdr-rs.spec of Package rtl-sdr-rs

#
# spec file for package rtl-sdr-rs
#
# Copyright (c) 2022-2025, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           rtl-sdr-rs
Version:        0.3.1
Release:        0
Summary:        RTL-SDR library written in Rust
License:        GPL-3.0-or-later
Group:          Productivity/Hamradio/Other
#Git-Clone:     https://github.com/ccostes/rtl-sdr-rs.git
URL:            https://github.com/ccostes/rtl-sdr-rs
Source:         %{name}-%{version}.tar.xz
Source1:        vendor.tar.zst
BuildRequires:  cargo-packaging
ExclusiveArch:  %{rust_tier1_arches}

%description
RTL-SDR library written in Rust.

example programs:
 * rtl_tcp
 * rtl_test
 * simple_fm

%prep
%autosetup -p 1 -a 1

%build
%{cargo_build} --example rtl_tcp
%{cargo_build} --example rtl_test
%{cargo_build} --example simple_fm

%install
install -Dm0755 target/release/examples/simple_fm %{buildroot}%{_bindir}/simple_fm
install -Dm0755 target/release/examples/rtl_test %{buildroot}%{_bindir}/rtl_test
install -Dm0755 target/release/examples/rtl_tcp %{buildroot}%{_bindir}/rtl_tcp

%files
%license LICENSE
%doc readme.md
%{_bindir}/rtl_tcp
%{_bindir}/rtl_test
%{_bindir}/simple_fm

%changelog
openSUSE Build Service is sponsored by