Group :: Archiving/Backup
RPM: restic
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%global import_path github.com/restic/restic
Name: restic
Version: 0.16.0
Release: alt1
Summary: Fast, secure, efficient backup program
License: BSD-2-Clause
Group: Archiving/Backup
Vcs: https://github.com/restic/restic
Url: https://restic.net/
Source: %name-%version.tar
BuildRequires(pre): rpm-build-golang
BuildRequires: golang
%description
restic is a backup program that is fast, efficient and secure.
%prep
%setup
%build
export BUILDDIR="$PWD/.build"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
%golang_prepare
cd .build/src/%import_path
%golang_build cmd/restic
%install
export BUILDDIR="$PWD/.build"
export IGNORE_SOURCES=1
%golang_install
for f in doc/man/*.?; do
install -Dp "$f" "%buildroot/%_man1dir/$(basename "$f")"
done
mkdir -p %buildroot%_datadir/zsh/site-functions
%buildroot%_bindir/%name generate --zsh-completion %buildroot%_datadir/zsh/site-functions/_%name
mkdir -p %buildroot%_datadir/bash-completion/completions
%buildroot%_bindir/%name generate --bash-completion %buildroot%_datadir/bash-completion/completions/%name
mkdir -p %buildroot%_datadir/fish/vendor_completions.d
%buildroot%_bindir/%name generate --fish-completion %buildroot%_datadir/fish/vendor_completions.d/%name.fish
%check
PATH=%buildroot%_bindir:$PATH
restic version
export RESTIC_PASSWORD=testic
restic --repo ../test init
restic --repo ../test backup .
restic --repo ../test restore latest -t ../x
cd ../x
restic --repo ../test backup .
S=($(restic --repo ../test snapshots | grep localhost | cut -d' ' -f1))
restic --repo ../test diff ${S[*]}
restic --repo ../test check --read-data
cd ..
diff -qr %name-%version x
%files
%_bindir/*
%_man1dir/*.1*
%doc *.md
%_datadir/zsh/site-functions/_%name
%_datadir/bash-completion/completions/%name
%_datadir/fish/vendor_completions.d/%name.fish
%changelog
…
Full changelog you can see here
Name: restic
Version: 0.16.0
Release: alt1
Summary: Fast, secure, efficient backup program
License: BSD-2-Clause
Group: Archiving/Backup
Vcs: https://github.com/restic/restic
Url: https://restic.net/
Source: %name-%version.tar
BuildRequires(pre): rpm-build-golang
BuildRequires: golang
%description
restic is a backup program that is fast, efficient and secure.
%prep
%setup
%build
export BUILDDIR="$PWD/.build"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
%golang_prepare
cd .build/src/%import_path
%golang_build cmd/restic
%install
export BUILDDIR="$PWD/.build"
export IGNORE_SOURCES=1
%golang_install
for f in doc/man/*.?; do
install -Dp "$f" "%buildroot/%_man1dir/$(basename "$f")"
done
mkdir -p %buildroot%_datadir/zsh/site-functions
%buildroot%_bindir/%name generate --zsh-completion %buildroot%_datadir/zsh/site-functions/_%name
mkdir -p %buildroot%_datadir/bash-completion/completions
%buildroot%_bindir/%name generate --bash-completion %buildroot%_datadir/bash-completion/completions/%name
mkdir -p %buildroot%_datadir/fish/vendor_completions.d
%buildroot%_bindir/%name generate --fish-completion %buildroot%_datadir/fish/vendor_completions.d/%name.fish
%check
PATH=%buildroot%_bindir:$PATH
restic version
export RESTIC_PASSWORD=testic
restic --repo ../test init
restic --repo ../test backup .
restic --repo ../test restore latest -t ../x
cd ../x
restic --repo ../test backup .
S=($(restic --repo ../test snapshots | grep localhost | cut -d' ' -f1))
restic --repo ../test diff ${S[*]}
restic --repo ../test check --read-data
cd ..
diff -qr %name-%version x
%files
%_bindir/*
%_man1dir/*.1*
%doc *.md
%_datadir/zsh/site-functions/_%name
%_datadir/bash-completion/completions/%name
%_datadir/fish/vendor_completions.d/%name.fish
%changelog
…
Full changelog you can see here