2020-04-15 16:34:40 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package onefetch
|
|
|
|
|
#
|
2025-01-07 13:14:11 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2020-04-15 16:34:40 +00:00
|
|
|
#
|
|
|
|
|
# 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: onefetch
|
2025-07-09 06:33:27 +00:00
|
|
|
Version: 2.25.0
|
2020-04-15 16:34:40 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Git repository summary on your terminal
|
2021-12-08 15:35:49 +00:00
|
|
|
License: GPL-2.0-only AND MIT
|
2020-04-15 16:34:40 +00:00
|
|
|
Group: System/X11/Terminals
|
|
|
|
|
URL: https://github.com/o2sh/onefetch
|
2022-10-27 10:23:56 +00:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2020-04-15 16:34:40 +00:00
|
|
|
Source1: vendor.tar.xz
|
2022-10-27 10:23:56 +00:00
|
|
|
Source2: cargo_config
|
|
|
|
|
BuildRequires: cargo-packaging
|
2022-10-27 11:08:33 +00:00
|
|
|
BuildRequires: cmake
|
2020-04-15 16:34:40 +00:00
|
|
|
BuildRequires: rust
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Onefetch is a command line tool that displays information about your Git repository directly on your terminal.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%setup -q -D -T -a 1
|
2022-03-03 17:58:02 +00:00
|
|
|
mkdir -p .cargo
|
2022-10-27 10:23:56 +00:00
|
|
|
cp %{SOURCE2} .cargo/config
|
2020-04-15 16:34:40 +00:00
|
|
|
|
|
|
|
|
%build
|
2020-09-02 07:28:30 +00:00
|
|
|
# bypass error https://bugzilla.opensuse.org/show_bug.cgi?id=1175502
|
|
|
|
|
# to avoid cargo reported error if config.guess has been changed
|
|
|
|
|
# by build macro.
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
|
guessname='src/libbacktrace/config.guess'
|
|
|
|
|
cfgguess="./vendor/backtrace-sys/$guessname"
|
|
|
|
|
chkjson='./vendor/backtrace-sys/.cargo-checksum.json'
|
|
|
|
|
if [[ -f $cfgguess ]] && [[ -f $chkjson ]]; then
|
|
|
|
|
chksum=`sha256sum $cfgguess |sed -e 's/ .*//'`
|
|
|
|
|
grep -q $guessname $chkjson && grep -q $chksum $chkjson || sed -i -e "s#\($guessname.:.\)[0-9a-f]*#\1$chksum#" $chkjson
|
|
|
|
|
fi
|
|
|
|
|
%endif
|
2022-10-27 10:23:56 +00:00
|
|
|
%{cargo_build}
|
2020-04-15 16:34:40 +00:00
|
|
|
|
|
|
|
|
%install
|
2022-10-27 10:23:56 +00:00
|
|
|
#install -Dm0755 target/release/onefetch %{buildroot}%{_bindir}/onefetch
|
|
|
|
|
%{cargo_install}
|
2020-04-15 16:34:40 +00:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE.md
|
2020-12-18 14:29:36 +00:00
|
|
|
%doc README.md
|
2020-04-15 16:34:40 +00:00
|
|
|
%{_bindir}/onefetch
|
|
|
|
|
|
|
|
|
|
%changelog
|