File pfetch-rs.spec of Package pfetch-rs
#
# spec file for package espanso
#
# Copyright (c) 2021 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/
#
Name: pfetch-rs
Version: 2.9.1
Release: 0
Summary: A rewrite of the pfetch system information tool in Rust
License: MIT
Group: Productivity/Text/Utilities
URL: https://github.com/Gobidev/pfetch-rs
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.xz
Source2: cargo_config.tar.gz
BuildRequires: cargo
BuildRequires: gcc
%if 0%{?fedora}
BuildRequires: rust-packaging
BuildRequires: cargo-rpm-macros
BuildRequires: kernel-headers
%else
%if 0%{?mageia}
BuildRequires: cargo-rpm-macros
%else
BuildRequires: cargo-packaging
%endif
%endif
%description
A rewrite of the pfetch system information tool in Rust
%prep
%autosetup -p1 -a 1 -a 2
install -D -m 644 cargo_config .cargo/config
%build
tar -xf %{SOURCE1}
cargo build --release --offline
%install
install -D -m 0755 target/release/pfetch \
%{buildroot}%{_bindir}/pfetch
%files
%license LICENSE
%doc README.md
%{_bindir}/pfetch
%changelog