File rubocop.spec of Package rubocop

#
# spec file for package rubocop
#
# 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:           rubocop
Version:        1.60.2
Release:        0
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  update-alternatives
URL:            https://github.com/rubocop/rubocop
Source:         rubocop-container-1.60.2
Summary:        Rubocop %{version} running in a container
License:        MIT
Group:          Development/Languages/Ruby
PreReq:         update-alternatives
Recommends:     podman

%description
This package contains a wrapper for Rubocop %{version} running in a container.

%post
/usr/sbin/update-alternatives --install /usr/bin/rubocop rubocop /usr/bin/rubocop-container-%{version} 16000

%preun
/usr/sbin/update-alternatives --remove rubocop /usr/bin/rubocop-container-%{version}

%prep

%build

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 %{SOURCE0} $RPM_BUILD_ROOT/usr/bin

%files
%defattr(-,root,root)
/usr/bin/rubocop-container-%{version}

%changelog
openSUSE Build Service is sponsored by