xenithorb / rpms / borgmatic

Forked from rpms/borgmatic 5 years ago
Clone

Blame borgmatic.spec

c922650
%global srcname borgmatic
c922650
%global debug_package %{nil}
c922650
c922650
Name:           %{srcname}
c922650
Version:        1.1.15
9aa4297
Release:        2%{?dist}
c922650
Summary:        Simple Python wrapper script for borgbackup
c922650
c922650
License:        GPLv3
c922650
URL:            https://torsion.org/borgmatic
c922650
Source0:        https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
c922650
Source1:        https://projects.torsion.org/witten/borgmatic/raw/branch/master/LICENSE
c922650
Source2:        borgmatic.service
c922650
Source3:        borgmatic.timer
c922650
c922650
# build
c922650
BuildRequires:  python%{python3_pkgversion}-devel
c922650
BuildRequires:  python%{python3_pkgversion}-setuptools
c922650
c922650
%{?systemd_requires}
c922650
BuildRequires:  systemd
c922650
c922650
# test
c922650
%if 0%{?fedora}
c922650
BuildRequires:  python%{python3_pkgversion}-pytest
c922650
BuildRequires:  python%{python3_pkgversion}-pykwalify
c922650
BuildRequires:  python%{python3_pkgversion}-ruamel-yaml
c922650
BuildRequires:  python%{python3_pkgversion}-flexmock
c922650
%endif
c922650
c922650
%description
c922650
borgmatic (formerly atticmatic) is a simple Python wrapper script for
c922650
the Borg backup software that initiates a backup, prunes any old backups
c922650
according to a retention policy, and validates backups for consistency.
c922650
c922650
%prep
c922650
%setup -n %{srcname}-%{version}
c922650
rm -rf %{srcname}.egg-info
c922650
c922650
%build
c922650
%py3_build
c922650
c922650
%install
c922650
find . -name *.so -type f -exec chmod 0755 {} \;
c922650
c922650
%py3_install
c922650
c922650
install -d %{buildroot}%{_unitdir}
c922650
install -d %{buildroot}%{_docdir}
795f581
install -d %{buildroot}%{_sysconfdir}/borgmatic
9aa4297
install -d %{buildroot}%{_sysconfdir}/borgmatic.d
c922650
c922650
install -D -m 644 %{SOURCE1} %{buildroot}%{_docdir}
c922650
install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
c922650
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}
c922650
c922650
%check
c922650
# epel lacks of required packages for testing
c922650
%if 0%{?fedora}
c922650
py.test-3 borgmatic/tests/unit
c922650
%endif
c922650
c922650
%files
c922650
%doc README.md PKG-INFO
c922650
795f581
%attr(0750, root, root) %{_sysconfdir}/borgmatic
795f581
%attr(0750, root, root) %{_sysconfdir}/borgmatic.d
c922650
%{python3_sitelib}/*
c922650
%{_bindir}/borgmatic
c922650
%{_bindir}/generate-borgmatic-config
c922650
%{_bindir}/upgrade-borgmatic-config
c922650
%{_unitdir}/borgmatic.service
c922650
%{_unitdir}/borgmatic.timer
c922650
%{_docdir}/LICENSE
c922650
c922650
%post
c922650
%systemd_post borgmatic.timer
c922650
c922650
%preun
c922650
%systemd_preun borgmatic.timer
c922650
c922650
%postun
c922650
%systemd_postun borgmatic.timer
c922650
c922650
%changelog
9aa4297
* Thu Apr 12 2018 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.1.15-2
9aa4297
- add empty /etc/borgmatic.d as described in documentation
795f581
- add empty /etc/borgmatic as described in documentation
9aa4297
c3d7577
* Thu Apr 12 2018 Benjamin Pereto <benjamin@sandchaschte.ch> - 1.1.15-1
c922650
- Initial packaging for the borgmatic project
c922650