Blob Blame History Raw
%global srcname borgbackup

Name:           %{srcname}
Version:        1.0.2
Release:        1%{?dist}
Summary:        A deduplicating backup program with compression and authenticated encryption

License:        BSD
URL:            https://borgbackup.readthedocs.org
Source0:        http://pypi.python.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz

Patch0:         utf8_to_unicode_string_literal.patch

# build
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-setuptools_scm
BuildRequires:  python%{python3_pkgversion}-Cython
BuildRequires:  python%{python3_pkgversion}-llfuse

# test
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-msgpack >= 0.4.6

# docs
%if 0%{?rhel}
# pyton3-sphinx packages are not available in epel
# so we use the old python2
BuildRequires:  python-sphinx
BuildRequires:  python-sphinx_rtd_theme
%else
BuildRequires:  python%{python3_pkgversion}-sphinx
BuildRequires:  python%{python3_pkgversion}-sphinx_rtd_theme
%endif

# no python deps
BuildRequires:  fuse
BuildRequires:  openssl-devel >= 1.0.0
BuildRequires:  lz4-devel
BuildRequires:  fuse-devel
BuildRequires:  libacl-devel

Requires:       python%{python3_pkgversion}-msgpack >= 0.4.6
Requires:       python%{python3_pkgversion}-llfuse

%description
BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it
supports compression and authenticated encryption.

%prep
%setup -n %{srcname}-%{version}
rm -rf %{srcname}.egg-info

# epel has an old version of sphinx and therefore
# it needs a patched docs until its fixed upstream
%patch0 -p1

%build
%py3_build
%{__python3} setup.py build_ext --inplace

# manpage
%{__python3} setup.py build_usage
%{__python3} setup.py build_api


%if 0%{?rhel}
make -C docs man
%else
make -C docs SPHINXBUILD=sphinx-build-3 man
%endif

%install
find . -name *.so -type f -exec chmod 0755 {} \;

%py3_install
install -D -m 0644 docs/_build/man/borg*.1* %{buildroot}%{_mandir}/man1/borg.1

%check
PYTHONPATH=$(pwd) py.test-3 --pyargs borg.testsuite -vk "not test_non_ascii_acl and not test_fuse_mount and not benchmark" 

%files 
%license LICENSE
%doc README.rst PKG-INFO AUTHORS
%doc docs/changes.rst
%{_mandir}/man1/*

%{python3_sitearch}/*
%{_bindir}/borg


%changelog
* Sat Apr 16 2016 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.0.2-1
- added epel7 specific parts
- make manpage generation work with epel7

* Sat Apr 16 2016 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.0.1-2
- simplified specfile
- removed unneeded dependencies: python3-mock, python3-pytest-cov

* Sun Apr 10 2016 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.0.1-1
- Upstream version 1.0.1. see changelog

* Thu Apr 07 2016 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.0.0-2
- Added requires for python3-llfuse (#1324685)
- Added minversion for openssl

* Mon Apr 04 2016 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.0.0-1
- Upstream version 1.0.0
- Rewrote build requirements for EPEL7

* Thu Dec 17 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.29.0-3
- Specified correct project URL
- Added Buildrequires python3-sphinx_rtd_theme for f23

* Thu Dec 17 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.29.0-2
- Cleanup Spec
- Rename package to borgbackup
 
* Mon Dec 14 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.29.0-1
- New Upstream Version
- Added manpage from Upstream
- Testsuite now functional without benchmark

* Sat Dec 05 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-6
- Added correct testsuite to check
- Removed unnessesary statements

* Fri Dec 04 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-5
- Renamed Specfile to python3 only and remove pre-built egg-info

* Wed Dec 02 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-4
- Removed double package statement and sum macro

* Tue Dec 01 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-3
- Added dependency python3-msgpack to buildrequires

* Tue Dec 01 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-2
- Added dependency python3-msgpack

* Tue Dec 01 2015 Benjamin Pereto <benjamin@sandchaschte.ch> - 0.28.2-1
- Initial Packaging for the BorgBackup Project