File autorestic.spec of Package autorestic
#
# spec file for package autorestic
#
# Copyright (c) 2023 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: autorestic
Version: 1.8.3
Release: 0
Summary: Config driven, easy backup cli for restic
License: Apache-2.0
URL: https://autorestic.vercel.app/
Source: https://github.com/cupcakearmy/autorestic/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz
BuildRequires: golang-packaging
%{go_nostrip}
Requires: restic >= 0.17.0
BuildRequires: pkgconfig(bash-completion)
BuildRequires: zsh
BuildRequires: fish
# Recommends: rclone
%description
Autorestic is a wrapper around the amazing restic. While being amazing the
restic cli can be a bit overwhelming and difficult to manage if you have many
different locations that you want to backup to multiple locations. This utility
is aimed at making this easier 🙂.
🌈 Features
- YAML config files, no CLI
- Incremental -> Minimal space is used
- Backup locations to multiple backends
- Snapshot policies and pruning
- Fully encrypted
- Before/after backup hooks
- Exclude pattern/files
- Cron jobs for automatic backup
- Backup & Restore docker volume
- Generated completions for [bash|zsh|fish|powershell]
%package bash-completion
Summary: Bash completion for %{name}
Requires: %{name} = %{version}
Supplements: (bash and %{name})
BuildArch: noarch
%description bash-completion
Autorestic is a wrapper around the amazing restic. While being amazing the
restic cli can be a bit overwhelming and difficult to manage if you have many
different locations that you want to backup to multiple locations.
This package holds the shell completion for bash.
%package fish-completion
Summary: Fish completion for %{name}
Requires: %{name} = %{version}
Supplements: (fish and %{name})
BuildArch: noarch
%description fish-completion
Autorestic is a wrapper around the amazing restic. While being amazing the
restic cli can be a bit overwhelming and difficult to manage if you have many
different locations that you want to backup to multiple locations.
This package holds the shell completion for fish.
%package zsh-completion
Summary: Zsh completion for %{name}
Requires: %{name} = %{version}
Supplements: (zsh and %{name})
BuildArch: noarch
%description zsh-completion
Autorestic is a wrapper around the amazing restic. While being amazing the
restic cli can be a bit overwhelming and difficult to manage if you have many
different locations that you want to backup to multiple locations.
This package holds the shell completion for bash.
%prep
%autosetup -p1 -a 1
%build
go build -buildmode=pie -mod=vendor
./autorestic --version
./autorestic help
for shell in bash zsh fish ; do
./autorestic completion ${shell} > completion.${shell}
done
%install
install -D -m 0755 autorestic %{buildroot}%{_bindir}/autorestic
install -D -m 0700 -d %{buildroot}/etc/autorestic
install -D -m 0644 completion.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name}
install -D -m 0644 completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
install -D -m 0644 completion.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files
%license LICENSE
%doc *.md
%{_bindir}/autorestic
%dir /etc/autorestic
%files bash-completion
%license LICENSE
%{_datadir}/bash-completion/completions/%{name}
%files fish-completion
%license LICENSE
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%files zsh-completion
%license LICENSE
%{_datadir}/zsh/site-functions/_%{name}
%changelog