depl 2.4.1

Toolkit for a bunch of local and remote CI/CD actions
Documentation
Name:           deployer
Version:        {package-version}
Release:        0
License:        MIT
Summary:        Toolkit for a bunch of local and remote CI/CD actions
URL:            https://github.com/impulse-sw/deployer

BuildRequires:  git
BuildRequires:  curl
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig

Recommends:     podman
Recommends:     ansible

%description
Deployer is a relatively simple, yet powerful localhost
CI/CD instrument.

%prep
if [ -d %{name}-%{version} ]; then
    rm -rf %{name}-%{version}
fi
git clone --branch stable --depth 1 %{url}.git %{name}-%{version}
cd %{name}-%{version}

%build
cd %{name}-%{version}
cargo build --release

%install
cd %{name}-%{version}
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_docdir}/%{name}
install -d %{buildroot}%{_datadir}/licenses/%{name}
install -m 755 target/release/depl %{buildroot}%{_bindir}/depl
install -m 644 README.md %{buildroot}%{_docdir}/%{name}/
install -m 644 MIGRATIONS.md %{buildroot}%{_docdir}/%{name}/
install -m 644 DOCS.md %{buildroot}%{_docdir}/%{name}/
install -m 644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/

%files
%license LICENSE
%doc README.md
%doc MIGRATIONS.md
%doc DOCS.md
%{_bindir}/depl

%post
/sbin/ldconfig

%postun
/sbin/ldconfig