A new user interface for you! Read more...

File duplicity.spec of Package duplicity

#
# spec file for package duplicity
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

%define _unpackaged_files_terminate_build 0

%{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           duplicity
%if 0%{?suse_version} > 1210
BuildRequires:  librsync-devel >= 0.9.6
%else
%if 0%{?suse_version}
BuildRequires:  librsync-devel >= 0.9.6
%else
# RHEL / CentOS etc...
BuildRequires:  librsync-devel >= 0.9.6
%endif
%endif
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Summary:        Encrypted bandwidth-efficient backup using the rsync algorithm
License:        GPL-3.0+
Group:          Productivity/Archiving/Backup
Version:        0.6.24
Release:        0
Url:            http://duplicity.nongnu.org/
Source:         http://code.launchpad.net/%{name}/0.6-series/%{version}/+download/%{name}-%{version}.tar.gz
Source99:       duplicity-rpmlintrc
Patch1:         duplicity-remove_shebang.patch
Requires:       gpg
Requires:       python-lockfile
%if 0%{?suse_version}
Recommends:     python-boto ncftp
%{py_requires}
%endif
%if 0%{?suse_version} == 1110 
# On SLES 11 we required librsync...
Requires:       librsync
%{py_requires}
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Duplicity incrementally backs up files and directories by encrypting
tar-format volumes with GnuPG and uploading them to a remote (or local)
file server. In theory many remote backends are possible; right now
local, ssh/scp, ftp, rsync, HSI, WebDAV, and Amazon S3 backends are
written.

Because duplicity uses librsync, the incremental archives are space
efficient and only record the parts of files that have changed since
the last backup. Currently duplicity supports deleted files, full unix
permissions, directories, symbolic links, fifos, etc., but not hard
links.


%prep
%setup -q
%patch1 -p1

%build
%{__python} setup.py build

%install
%if 0%{?suse_version}
%{__python} setup.py install --prefix=/usr --root="$RPM_BUILD_ROOT" --record-rpm=files.lst
%else
%{__python} setup.py install --prefix=/usr --root="$RPM_BUILD_ROOT" --record=files.lst
%endif
%__rm -rf $RPM_BUILD_ROOT/usr/share/doc/duplicity-%{version}
%__perl -n -i -e 'print unless m,(%{_bindir}|%{_mandir}|%{_datadir}/doc|%{_datadir}/locale|%{python_sitearch}/testing),' files.lst
%find_lang %{name}
cat %{name}.lang files.lst > rpmfiles.lst

%files -f rpmfiles.lst
%defattr(-,root,root)
%doc CHANGELOG COPYING README
%{_bindir}/duplicity
%{_bindir}/rdiffdir
%doc %{_mandir}/man1/duplicity.1%{ext_man}
%doc %{_mandir}/man1/rdiffdir.1%{ext_man}

%changelog