File rinstall.spec of Package rinstall
#
# spec file for package rinstall
#
# 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/
#
Name: rinstall
Version: 0.2.0~git35.c30f365
Release: 0
Summary: Declarative install for programs
# If you know the license, put it's SPDX string here.
# Alternately, you can use cargo lock2rpmprovides to help generate this.
License: GPL-3.0-or-later
# Select a group from this link:
# https://en.opensuse.org/openSUSE:Package_group_guidelines
URL: https://github.com/danyspin97/rinstall
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires: cargo-packaging
%description
An helper tool that installs software and additional data into the system.
%package bash-completion
Summary: Bash completion for %{name}
Requires: %{name}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description bash-completion
bash command line completion support for %{name}.
%prep
%autosetup -a1 -p1
%build
%{cargo_build}
%install
# same as rpm.macros provided by rinstall
# update accordingly if needed
./target/release/rinstall \
install \
--packaging \
--destdir %{buildroot} \
--prefix %{_prefix} \
--libdir /usr/lib \
--libexecdir %{_libexecdir} \
--includedir %{_includedir} \
--mandir %{_mandir} \
--docdir %{_datadir}/doc/packages \
--completions bash \
--yes
%check
%{cargo_test}
%files
%doc README.md CHANGELOG.md
%license LICENSE.md
%{_bindir}/%{name}
%{_rpmconfigdir}/macros.d/macros.%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%files bash-completion
%{_datadir}/bash-completion/completions/%{name}.bash
%changelog