File dockcheck.spec of Package dockcheck

#
# spec file for package $YOUR_PACKAGE
#
# 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 http://bugs.opensuse.org/
#


Name:           dockcheck
Version:        0.6.4
Release:        0
Summary:        A command-line tool to automate docker image updates
License:        GPL-3.0
Group:          Productivity/Networking/Web/Utilities
URL:            https://github.com/mag37/dockcheck
BuildArch:      noarch
Source0:        https://github.com/mag37/dockcheck/archive/refs/tags/v%{version}.tar.gz
# Don't use env in the main script
Patch1:         dockcheck.sh.patch 
Requires:       bash
Requires:       docker
Requires:       docker-compose
Requires:       jq
Requires:       regclient

%description
Dockcheck is a cli tool to automate docker image updates with selective, notifications, autoprune, and no pre-pulling.

%prep
%setup -q
%patch -P 1

%build

%install
install -D dockcheck.sh %{buildroot}/%{_bindir}/%{name}
for notify_script in notify_templates/notify_*.sh; do
    install -D "$notify_script" %{buildroot}/%{_datadir}/%{name}/${notify_script##*/}
done

%files
%license LICENSE
%doc README.md
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_datadir}/%{name}
%attr(0644,root,root) %{_datadir}/%{name}/*.sh

%changelog
openSUSE Build Service is sponsored by