File rinse.spec of Package rinse

#
# spec file for package rinse
#
# Copyright (c) 2020 Samu Voutilainen
#
# 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.

Name:           rinse
Version:        3.5
Release:        0
Summary:        Creates minimal RPM based distribution in local directory
License:        GPL-2.0
Group:          System/Packages
Url:            https://salsa.debian.org/debian/rinse
Source0:        %{name}-%{version}.tar.xz
Source1:        rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  fdupes

%description
The rinse utility is designed to install a minimal RPM-based
distribution of GNU/Linux within a local directory.

The purpose and usage are analogous to the 'debootstrap' utility
familiar to users of Debian GNU/Linux.

%package bash-completion
Summary:        Rinse Bash completion
Group:          System/Shells
Requires:       %{name} = %{version}
Requires:       bash-completion
Supplements:    packageand(rinse:bash)

%description bash-completion
Optional dependency offering bash completion for rinse.

%prep
%setup -q

echo VERSION=%{version} > %{_builddir}/%{name}-%{version}/VERSION

%build
%make_build

%install
%make_install

%fdupes %{buildroot}%{_prefix}/lib/%{name}

%files
%dir %{_prefix}/lib/%{name}

%{_sbindir}/%{name}
%config(noreplace) /etc/rinse
%{_prefix}/lib/%{name}/**

%{_mandir}/man8/rinse.8*

%files bash-completion
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions

%{_datadir}/bash-completion/completions/rinse

%changelog