File nmrs.spec of Package nmrs

#
# spec file for package nmrs
#
# Copyright (c) 2026 mantarimay
#
# 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/
#


%bcond_without test
Name:           nmrs
Version:        1.3.5
Release:        0
Summary:        A lightweight graphical frontend for NetworkManager
License:        MIT
URL:            https://github.com/cachebag/nmrs
Source0:        %{url}/archive/%{name}-v%{version}/%{name}-%{name}-v%{version}.tar.gz
Source1:        vendor.tar.zst
BuildRequires:  cargo-packaging
BuildRequires:  pkgconfig(gtk4)
BuildRequires:  pkgconfig(libadwaita-1)
Requires:       NetworkManager

%description
nmrs is a lightweight graphical frontend for NetworkManager, built with
Rust and GTK4. It provides an intuitive interface for viewing and managing
network connections, using a D-Bus proxy core that communicates directly
with NetworkManager’s DBus API—without relying on wrapper tools such as nmcli.

%prep
%autosetup -n %{name}-%{name}-v%{version} -a1 -p1

%build
%{cargo_build}

%install
install -Dm755 target/release/%{name}-gui %{buildroot}%{_bindir}/%{name}
install -Dm644 nmrs.desktop -t %{buildroot}%{_datadir}/applications

%if %{with test}
%check
%{cargo_test} -- --skip app_initializes_without_panic --skip style_css_loads
%endif

%files
%license LICEN*
%doc README*
%{_bindir}/%{name}
%{_datadir}/applications

%changelog
openSUSE Build Service is sponsored by