You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.9 KiB

Name: restic
Version: 0.13.1
Release: itix1
Summary: Fast, secure, efficient backup program
License: BSD
Source0: https://github.com/restic/%{name}/releases/download/v%{version}/%{name}_%{version}_linux_amd64.bz2
Source1: restic-excludes.txt
Source2: restic.conf
Source3: restic.service
Source4: restic.timer
Source5: restic-itix-backup
BuildRequires: systemd
ExclusiveArch: x86_64
%description
restic is a backup program that is fast, efficient and secure. It supports the
three major operating systems (Linux, macOS, Windows) and a few smaller ones
(FreeBSD, OpenBSD).
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c -T
bunzip2 -c %{S:0} > restic
cp %{S:1} excludes.txt
cp %{S:2} restic.conf
cp %{S:3} restic.service
cp %{S:4} restic.timer
cp %{S:5} itix-backup
%build
%install
install -m 0755 -D restic %{buildroot}/opt/restic/bin/restic
install -m 0600 -D restic.conf %{buildroot}/opt/restic/etc/restic.conf
install -m 0644 -D excludes.txt %{buildroot}/opt/restic/etc/excludes.txt
install -m 0755 -D itix-backup %{buildroot}/opt/restic/bin/itix-backup
install -m 0700 -d %{buildroot}/srv/restic
install -m 0700 -d %{buildroot}/srv/restic/tmp
install -m 0700 -d %{buildroot}/srv/restic/cache
install -m 0644 -D restic.service %{buildroot}/%{_unitdir}/restic.service
install -m 0644 -D restic.timer %{buildroot}/%{_unitdir}/restic.timer
%files
%defattr(0644, root, root, 0755)
%attr(0755, root, root) /opt/restic/bin/restic
%attr(0755, root, root) /opt/restic/bin/itix-backup
/opt/restic/etc
%config(noreplace) %attr(0600, root, root) /opt/restic/etc/restic.conf
%config(noreplace) /opt/restic/etc/excludes.txt
%attr(0700, root, root) /srv/restic
%attr(0700, root, root) /srv/restic/tmp
%attr(0700, root, root) /srv/restic/cache
%{_unitdir}/restic.service
%{_unitdir}/restic.timer
%changelog