File uutils-coreutils.spec of Package uutils-coreutils
#
# spec file for package uutils-coreutils
#
# Copyright (c) 2025 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: uutils-coreutils
Version: 0.8.0
Release: 0
Group: System/Base
Summary: Cross-platform Rust rewrite of the GNU coreutils
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License: MIT
URL: https://github.com/uutils/coreutils
Source0: uutils-coreutils-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: make
BuildRequires: gcc-c++
%if 0%{?sle_version} == 150600
BuildRequires: libstdc++6-devel-gcc13
%endif
BuildRequires: clang-devel
BuildRequires: libselinux-devel
%description
A rust rewrite of GNU coreutils that aims to be dropin compatible with GNU coreutils.
The package provides the muticall binary.
%package man
Summary: Man page for %{name}
BuildArch: noarch
%description man
Man page for package %{name}
%prep
%setup -q -n coreutils-%{version}
%setup -qa1 -n coreutils-%{version}
%build
PROFILE=release SELINUX_ENABLED=1 MULTICALL=y make
%install
strip %{_builddir}/coreutils-%{version}/target/release/coreutils
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/coreutils-%{version}/target/release/coreutils %{buildroot}%{_bindir}/coreutils
install -D -d -m 0755 %{buildroot}%{_datadir}/man/man1/
cargo install --bin uudoc --features uudoc --path .
~/.cargo/bin/uudoc manpage coreutils > %{buildroot}%{_datadir}/man/man1/coreutils.1
%files
%{_bindir}/coreutils
%license LICENSE
%doc README.package.md
%files man
%{_datadir}/man/man1/coreutils.1.gz
%changelog