xenithorb / rpms / borgmatic

Forked from rpms/borgmatic 5 years ago
Blob Blame History Raw
%global srcname borgmatic
%global debug_package %{nil}

Name:           %{srcname}
Version:        1.1.15
Release:        1%{?dist}
Summary:        Simple Python wrapper script for borgbackup

License:        GPLv3
URL:            https://torsion.org/borgmatic
Source0:        https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
Source1:        https://projects.torsion.org/witten/borgmatic/raw/branch/master/LICENSE
Source2:        borgmatic.service
Source3:        borgmatic.timer

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

BuildRequires:  systemd

# test
%if 0%{?fedora}
BuildRequires:  python%{python3_pkgversion}-pytest
BuildRequires:  python%{python3_pkgversion}-pykwalify
BuildRequires:  python%{python3_pkgversion}-ruamel-yaml
BuildRequires:  python%{python3_pkgversion}-flexmock

borgmatic (formerly atticmatic) is a simple Python wrapper script for
the Borg backup software that initiates a backup, prunes any old backups
according to a retention policy, and validates backups for consistency.

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


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


install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_docdir}

install -D -m 644 %{SOURCE1} %{buildroot}%{_docdir}
install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}

# epel lacks of required packages for testing
%if 0%{?fedora}
py.test-3 borgmatic/tests/unit



%systemd_post borgmatic.timer

%systemd_preun borgmatic.timer

%systemd_postun borgmatic.timer

* Thu Apr 12 2018 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.1.15-1
- Initial packaging for the borgmatic project