]> git.pld-linux.org Git - packages/restic.git/blob - restic.spec
deae8dac44d597d577748dbe055a5bd5b8b2a552
[packages/restic.git] / restic.spec
1 Summary:        Fast, secure, efficient backup program
2 Name:           restic
3 Version:        0.8.1
4 Release:        0.1
5 License:        BSD
6 Group:          Applications/System
7 Source0:        https://github.com/restic/restic/releases/download/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  01eb26583c9a91be33697b2a4c917422
9 URL:            https://restic.net/
10 %ifarch %{x8664} arm aarch64 ppc64
11 BuildRequires:  criu-devel >= 1.7
12 %endif
13 BuildRequires:  golang >= 1.7
14 BuildRequires:  pkgconfig
15 BuildRequires:  rpmbuild(macros) >= 1.228
16 Requires(post,preun):   /sbin/chkconfig
17 Requires(postun):       /usr/sbin/groupdel
18 Requires(pre):  /usr/bin/getgid
19 Requires(pre):  /usr/sbin/groupadd
20 Requires:       rc-scripts >= 0.4.0.10
21 #Requires:      uname(release) >= 4.1
22 Provides:       group(restic)
23 ExclusiveArch:  %{ix86} %{x8664} %{arm}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _enable_debug_packages 0
27 %define         gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
28 %define         gopath          %{_libdir}/golang
29 %define         import_path     github.com/lxc/lxd
30 %define         _libexecdir     %{_prefix}/lib
31
32 %description
33 restic is a backup program which allows saving multiple revisions of
34 files and directories in an encrypted repository stored on different
35 backends.
36
37 %prep
38 %setup -q
39
40 %build
41
42 go run build.go
43 mv README.rst README
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
48
49 install -p restic $RPM_BUILD_ROOT%{_bindir}
50 cp -p doc/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1/
51 rm -rf doc/man
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %files
57 %defattr(644,root,root,755)
58 %doc README CONTRIBUTING.md CHANGELOG.md doc/*.rst
59 %attr(755,root,root) %{_bindir}/restic
60 %{_mandir}/man1/*.1*
This page took 0.153348 seconds and 2 git commands to generate.