File linutil.spec of Package linutil

#
# spec file for package linutil
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#


%global crate linutil
%global _description %{expand:
Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox
designed to simplify everyday Linux tasks.}
%bcond_without check
Name:           linutil
Version:        2024.09.28~0
Release:        0
Summary:        Linutil is a toolbox designed to simplify everyday Linux tasks
License:        ((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSD-2-Clause OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (ISC) AND (MIT)
URL:            https://github.com/ChrisTitusTech/linutil
Source:         %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
BuildRequires:  cargo
BuildRequires:  cargo-packaging
BuildRequires:  desktop-file-utils
SourceLicense:  MIT

%description %{_description}

%files
%license LICENSE
%doc README.md
%{_bindir}/linutil
%{_datadir}/applications/*.desktop

%prep
%autosetup -p1 -a1

%build
%{cargo_build} --all

%install
%{cargo_install -p tui}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications  --set-key=Exec  --set-value=%{_bindir}/linutil  ./linutil.desktop

%if %{with check}
%check
%{cargo_test}
%endif

%changelog
openSUSE Build Service is sponsored by